This project is an implementation of operating txt with SQL, which is equivalent to using TXT files as a database, and can be used in some special cases.
Add sqlParser.jar package to module dependencies of your project.
Under the example folder, there are test cases of Insert, Select, Update, Delete, and you can directly run the main function test.
-
Support using insert, select, update, and delete to CRUD.
-
Insert supports simultaneous insertion of multiple data.
Example: insert into testtable (name, address) values ('innis',' China'), ('kk',' Malaysia')
- Insert can ignore column name insertion.
Example: insert into testtable values ('innis', 23,' China' )
.
- Support using the Where sentence + logic words to filter the content (likes don't support mixed logic)
Example: delete from testtable where address =' China' or (name =' inners3' and age = 27);
- Support the comparing of =, <>, >, > =, <, < =
- Support the select function of count, sum, avg, max, min, and distinct
select max(age) from datetime where address = 'China'
select min(age) from datetime where address = 'China'
select count(age) from datetime where address = 'China'
select avg(age) from datetime where address = 'China'
select sum(age) from datetime where address = 'China'
select distinct(age) from datetime where address = 'China'
- Support the select function of order by
select * from datetime where address = 'China' order by birthday asc
select * from datetime where address = 'China' order by birthday desc
- Select, Update, Delete must have a Where clause.
- String content must be wrapped in single quotation marks.
- Date, DateTime dataType
- Max,Min,count,avg,sum
- Order
- Compare dateTime,date
- Group
- Join
Coming Soon!
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License