"finish" database docs

db4
Doug Coleman 2008-10-04 13:21:06 -05:00
parent ce7cf81224
commit a057da4116
2 changed files with 27 additions and 0 deletions

View File

@ -49,6 +49,16 @@ HELP: new-statement
{ $values { "sql" string } { "in" sequence } { "out" sequence } { "class" class } { "statement" statement } } { $values { "sql" string } { "in" sequence } { "out" sequence } { "class" class } { "statement" statement } }
{ $description "Makes a new statement object from the given parameters." } ; { $description "Makes a new statement object from the given parameters." } ;
HELP: bind-statement
{ $values
{ "obj" object } { "statement" statement } }
{ $description "Sets the statement's " { $slot "bind-params" } " and calls " { $link bind-statement* } " to do the database-specific bind. Sets " { $slot "bound?" } " to true if binding succeeds." } ;
HELP: bind-statement*
{ $values
{ "statement" statement } }
{ $description "Does a low-level bind of the SQL statement's tuple parameters if the database requires. Some databases should treat this as a no-op and bind instead when the actual statement is run." } ;
HELP: <simple-statement> HELP: <simple-statement>
{ $values { "string" string } { "in" sequence } { "out" sequence } { $values { "string" string } { "in" sequence } { "out" sequence }
{ "statement" statement } } { "statement" statement } }

View File

@ -4,6 +4,23 @@ USING: classes help.markup help.syntax io.streams.string kernel
quotations sequences strings multiline math db.types db ; quotations sequences strings multiline math db.types db ;
IN: db.tuples IN: db.tuples
HELP: create-sql-statement
{ $values
{ "class" class }
{ "object" object } }
{ $description "Generates the SQL code for creating a table for a given class." } ;
HELP: drop-sql-statement
{ $values
{ "class" class }
{ "object" object } }
{ $description "Generates the SQL code for dropping a table for a given class." } ;
HELP: insert-tuple-set-key
{ $values
{ "tuple" tuple } { "statement" statement } }
{ $description "Inserts a tuple and sets its primary key in one word. This is necessary for some databases." } ;
HELP: <count-statement> HELP: <count-statement>
{ $values { $values
{ "query" query } { "query" query }