This class can be used to query arrays,html,xml or json file with a SQL-like syntax using LINQ.
It takes an array as parameter and can perform several types of queries using an SQL-like syntax as if the array was a relational database.
Currently it supports performing SELECT , DELETE, INSERT and UPDATE queries.
Example SELECT Queries:
========================
- SELECT *FROM myArray ORDER BY key DESC,value ASC,
- SELECT key,value FROM myArray WHERE value='100',
- SELECT * FROM json_file(my_json_file.txt),
- SELECT * FROM xml_file(http://tufyta.com/feed/).channel.item WHERE title LIKE '%linq%'
- SELECT *FROM html_file(http://tufyta.com).div WHERE class='post_title'
- SELECT *FROM text_file(data.txt) WHERE in_array('.line.',array(1,2,3,4,5,6,))
-SELECT * FROM dir_files(doc).files WHERE name LIKE '%D3Linq%'
- SELECT *FROM myArray.subitems WHERE name='Tufan'
- SELECT DISTINCT surname FROM personnels ORDER BY surname DESC
Example INSERT Queries:
========================
- INSERT INTO myArray (name,surname) VALUES ('Tufan','YILDIRIM')
- INSERT INTO myArray.subitems ('known_langs') VALUES ('PHP,C#,C++')
Example UPDATE Queries:
========================
- UPDATE myArray SET name='TUFAN' WHERE surname='YILDIRIM',
- UPDATE myarray.subitems SET known_lags='PHP,C#'
Example DELETE Queries:
========================
- DELETE FROM myArray WHERE name='Tufan'
- DELETE FROM myArray.subistems WHERE known_language LIKE '%PHP%'