The SQLite3 base is a bit different than the other clients, in that it may be run on both the client and server. So add another layer to the prototype chain.
Extent the "base" client, just specifying the dialect, since the actual implementations will differ on the client and server, we'll leave everything else to be handled in sub-classes of this object.
Extends the standard sql grammar, with any SQLite specific dialect oddities.
The keyword identifier wrapper format.
Compile the "order by" portions of the query.
Compile an insert statement into SQL.
If there are any "where" clauses, we need to omit any bindings that may have been associated with them.
If there is only one record being inserted, we will just use the usual query grammar insert builder because no special syntax is needed for the single row inserts in SQLite. However, if there are multiples, we'll continue.
SQLite requires us to build the multi-row insert as a listing of select with unions joining them together. So we'll build out this list of columns and then join them all together with select unions to complete the queries.
Compile a truncate table statement into SQL.
Grammar for the schema builder.
The possible column modifiers.
Compile the query to determine if a table exists.
Compile the query to determine if a column exists.
Compile a create table command.
SQLite forces primary keys to be added when the table is initially created so we will need to check for a primary key commands and add the columns to the table's declaration here so they can be created on the tables.
Get the foreign key syntax for a table creation statement. Once we have all the foreign key commands for the table creation statement we'll loop through each of them and add them to the create table SQL we are building, since SQLite needs foreign keys on the tables creation.
Get the primary key syntax for a table creation statement.
Ensure that autoincrement columns aren't handled here, this is handled alongside the autoincrement clause.
Compile alter table commands for adding columns
Compile a unique key command.
Compile a plain index key command.
Compile a foreign key command.
Handled on table creation...
Compile a drop column command.
Compile a drop unique key command.
Compile a rename table command.
Compile a rename column command.
Create the column definition for a integer type.
Create the column definition for a float type.
Create the column definition for a decimal type.
Create the column definition for a boolean type.
Create the column definition for a enum type.
Create the column definition for a date-time type.
Create the column definition for a timestamp type.
Get the SQL for an auto-increment column modifier.
SQLite3