Sunday, December 4, 2011

New schema bindings for sql

The TE syntax for schema of the form:
MySchema:Name,Height,...

Picks of the name and height from stores of persons. The default plan runs the schema generator for each row. An alternative is to bind the columns names to the special select, which then does:

select Name,Height from some table of persons;

The select can be bound prepared and stepped through the machie. I will add his binding or V2.0. This will actually be a super binding, a bind and prepare, so the TE grammar can set table names.

MySchema:table.(colname1.colname2)
By default becomes:
select colname1,colname2 from table wher ....

The the thing can be prepared against the known table, regardless of table format. So the developers prepares and tests the select. Then installs it with a default table name. Hen the prepared select is needed against ad hoc columns names, the machine will pull it back from sqlite3, dup is with the set of columns names in the schema, prep it and it become an operator.

The output returns, but the match function has an accumulated pass and collect on schema. The user can match other key values on a per column basis, but schema match function remains complete.

Of course the issue is table name. It seem natural to place table name in the lead on a syntax, but when the table is the current table, the null key no longer works. Hence the client needs something in the field, always. Hmmm...

No comments: