I don’t have a Github Account, but could look like this (maybe you have a more simple structure):
INSERT
[code]Dim sql as String = _
SQLBuilder_MTC.InsertInto( “table”) _
.Field( “date”, “YYYY-MM-DD [HH:MM:SS]”) _
.CondField( ssnProperty <> “” Or ssnProperty = “cool”, “ssn”, ssnProperty ) _
.CondField( amountProperty <> 0, “amount”, amountProperty ) _
.SQLExecute(db)
// INSERT INTO table (date, ssn, amount) VALUES (‘YYYY-MM-DD [HH:MM:SS]’, ‘ssnProperty’, amountProperty);
// Or
Dim sql() as String
sql.Append( SQLBuilder_MTC.InsertInto( “table”) _
.Field( “date”, “YYYY-MM-DD [HH:MM:SS]”) _
.CondField( ssnProperty <> “” Or ssnProperty = “cool”, “ssn”, ssnProperty ) _
.CondField( amountProperty <> 0, “amount”, amountProperty ) )
SQLBuilder_MTC.SQLExecute(db, sql)[/code]
UPDATE
[code]Dim sql as String = _
SQLBuilder_MTC.Update( “table” ) _
.Field( “ssn”, “newSsn” ) _
.Field( “amount”, newValue ) _
.Where( “id”, id ) _
.AndWhere( “name”, myName ) _
.OrWhere( “id”, myId ) _
.AndWhere( amount, “<”, 2 ) _
.SQLExecute(db)
// UPDATE table SET ssn = ‘newSsn’, amount = newValue WHERE id = id AND name = ‘myName’ OR id = myId AND amount < 2;[/code]
DELETE
[code]Dim sql As String = _
SQLBuilder_MTC.DeleteFrom( “table”) _
.Where( “id”, myId ) _
.OrWhere( “name”, “LIKE”, “Santana”) _
.SQLExecute(db)
// DELETE FROM table WHERE id = myId OR name ‘LIKE %Santana%’;[/code]
Thanks for the nice project