X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fref-fdml.xml;h=2908175042d8c71a5f54cb07c8c6df0a32192ff2;hb=f7a356bb4c11d062eeeb5d4aaf4e187a3cb15a27;hp=fa444a43367b385c266942406607e5a7064b2d05;hpb=04df7e672f08154fbc213236dfb2d2dd2023e802;p=clsql.git diff --git a/doc/ref-fdml.xml b/doc/ref-fdml.xml index fa444a4..2908175 100644 --- a/doc/ref-fdml.xml +++ b/doc/ref-fdml.xml @@ -10,11 +10,26 @@ Functional Data Manipulation Language (FDML) - + The functional data manipulation interface provided by &clsql; + includes functions for inserting, updating and deleting records + in existing database tables and executing SQL queries and + statements with the results of queries returned as Lisp types. + SQL statements expressed as strings may be executed with the + query and + execute-command + functions. The select function, on + the other hand, allows for the construction of queries in Lisp + using the symbolic SQL syntax. Finally, iterative manipulation + of query results is supported by do-query, map-query and an + extended clause for the loop macro. - @@ -1278,7 +1293,7 @@ ID FORENAME SURNAME EMAIL in the tuple. - + @@ -1461,6 +1476,16 @@ ID FORENAME SURNAME EMAIL Notes + + The select function is actually + implemented in &clsql; with a single + &rest parameter (which is subsequently + destructured) rather than the keyword parameters presented + here for the purposes of exposition. This means that incorrect + or missing keywords or values may not trigger errors in the + way that they would if select had been + defined using keyword arguments. + The field-names and result-types keyword arguments are a @@ -1657,77 +1682,6 @@ ID FORENAME SURNAME EMAIL - - - FOR-EACH-ROW - - - Function FOR-EACH-ROW - - Function - - - Syntax - - for-each-row &KEY FROM ORDER-BY WHERE DISTINCT LIMIT &REST FIELDS &body body => - - - Arguments and Values - - - - - - Description - - - - - - Examples - - - - - - Side Effects - - - - - - Affected by - - - - - - - - Exceptional Situations - - - - - - See Also - - query - print-query - do-query - map-query - loop - select - - - - Notes - - - - - - LOOP @@ -2109,287 +2063,5 @@ ID FORENAME SURNAME EMAIL - - - - - - PREPARE-SQL - - - Function PREPARE-SQL - Create a prepared statement. - Function - - - Syntax - - prepare-sql sql-stmt types &key database result-types field-names => result - - - Arguments and Values - - - - - - Description - Prepares a SQL statement sql-stmt - for execution. types contains a list of - types corresponding to the input parameters. Returns a - prepared-statement object. - - A type can be - :int - :double - :null - (:string n) - - - - - Examples - - - - - - Side Effects - - - - - - Affected by - - - - - - - - Exceptional Situations - - - - - - See Also - - - - - - - - Notes - - - - - - - - - RUN-PREPARED-SQL - - - Function RUN-PREPARED-SQL - Execute a prepared statement. - Function - - - Syntax - - run-prepared-sql prepared-stmt => - - - Arguments and Values - - - - - - Description - Execute the prepared sql statment. All input - parameters must be bound. - - - - Examples - - - - - - Side Effects - - - - - - Affected by - - - - - - - - Exceptional Situations - - - - - - See Also - - - - - - - - Notes - - - - - - - - - FREE-PREPARED-SQL - - - Function FREE-PREPARED-SQL - Delete a prepared statement object. - Function - - - Syntax - - free-prepared-sql prepared-stmt => - - - Arguments and Values - - - - - - Description - Delete the objects associated with a prepared - statement. - - - - Examples - - - - - - Side Effects - - - - - - Affected by - - - - - - - - Exceptional Situations - - - - - - See Also - - - - - - - - Notes - - - - - - - - - BIND-PARAMETER - - - Function BIND-PARAMETER - Bind a parameter in a prepared statement. - Function - - - Syntax - - bind-parameter prepared-stmt position value => - - - Arguments and Values - - - - - - Description - Sets the value of a parameter in a prepared statement. - - - - Examples - - - - - - Side Effects - - - - - - Affected by - - - - - - - - Exceptional Situations - - - - - - See Also - - - - - - - - Notes - - - - - - +