Ok update... This is a little more work then I thought it would be but I am closing in. I created a lot more work for myself but then had a "eureka" moment that simplified much of my work.
I haven't gotten the connector to actually change the database yet with my proposed features but I do have them working to make valid SQL code.
The following SQL format statements are working now with the new syntax:
DELETE table WHERE yes='no'
INSERT INTO table VALUES (1,2,3)
INSERT IGNORE INTO table VALUES (1,2,3)
INSERT INTO table (column1, column2, column3) VALUES (1,2,3)
INSERT INTO table VALUES (1,2,3), (4,5,6), (7, 8, 9)
REPLACE INTO table VALUES (1,2,3)
REPLACE IGNORE INTO table VALUES (1,2,3)
REPLACE INTO table (column1, column2, column3) VALUES (1,2,3)
REPLACE INTO table VALUES (1,2,3), (4,5,6), (7, 8, 9)
UPDATE table SET columns1='value1', column2='value2' WHERE this='that'
UPDATE IGNORE table SET columns1='value1', column2='value2' WHERE this='that'
SELECT * FROM table
SELECT column1, column2, column3 FROM table WHERE id=23
I am wondering what other commands we really need?
Do we really need the drop table, create table, alter table, show table and those sorts of commands?
I CAN add them but are they really necessary?
ToDo list:
1.Finish up the column and values stuff so they take arrays. Currently doing with strings.
2.Wrestling with the WHERE clause. I think this is a good time to check out the "criteria" feature trabis mentioned above.
3. Sorting out all of the Select variations. Thinking I will learn how to do this while tackling the where clause.
4. setup the actual SQL statements and access the database. Have been just creating the SQL statement its self at this point. Should be real simple to code the actual statements.
5. Comment and error trap the code.
I will likely put what I have in the SVN after I get through with #2 and build from there. I think the hardest things I have to tackle yet are the select statements and the where clause.