X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=doc%2Fappendix.xml;h=1fdbed0961cc581db0e248cdca7f3a995e1221e3;hp=16316b7b961c759b9e7f63b271b5914484642a53;hb=18e34efea688a6758b6e997401fbc3f241da98f3;hpb=c6fb3ef3ca0b79abd3d2e4ad6b8b29d8fe1b1324 diff --git a/doc/appendix.xml b/doc/appendix.xml index 16316b7..1fdbed0 100644 --- a/doc/appendix.xml +++ b/doc/appendix.xml @@ -7,14 +7,53 @@ Database Back-ends - - - PostgreSQL - - Libraries - The PostgreSQL back-end requires the PostgreSQL C - client library (libpq.so). The - location of this library is specified via + + + How CLSQL finds and loads foreign libraries + + For some database types CLSQL has to load external foreign + libaries. These are usually searched for in the standard + locations the operating system uses but you can tell &clsql; to + look into other directories as well by using the function + CLSQL:PUSH-LIBRARY-PATH or by directly + manipulating the special variable + CLSQL:*FOREIGN-LIBRARY-SEARCH-PATHS*. If, + say, the shared library libpq.so needed for PostgreSQL support + is located in the directory /opt/foo/ on + your machine you'd use + + (clsql:push-library-path "/opt/foo/") + + before loading the CLSQL-POSTGRESQL module. (Note the trailing + slash above!) + + If you want to combine this with fully automatic loading of + libraries via ASDF a technique like the following works: + + + (defmethod asdf:perform :after ((o asdf:load-op) + (c (eql (asdf:find-system 'clsql)))) + (funcall (find-symbol (symbol-name '#:push-library-path) + (find-package 'clsql)) + #p"/opt/foo/")) + + + + + Additionally, site-specific initialization can be done using an +initialization file. If the file /etc/clsql-init.lisp +exists, this file will be read after the &clsql; ASDF system is loaded. +This file can contain forms to set site-specific paths as well as change +&clsql; default values. + + + + PostgreSQL + + Libraries + The PostgreSQL back-end requires the PostgreSQL C + client library (libpq.so). The + location of this library is specified via *postgresql-so-load-path*, which defaults to /usr/lib/libpq.so. Additional flags to ld needed for linking are @@ -25,7 +64,7 @@ Initialization Use -(asdf:operate 'adsf:load-op 'clsql-postgresql) +(asdf:operate 'asdf:load-op 'clsql-postgresql) to load the PostgreSQL back-end. The database type for the PostgreSQL back-end is :postgresql. @@ -102,6 +141,9 @@ + Notes + None. + @@ -203,6 +245,9 @@ + Notes + None. + @@ -234,7 +279,7 @@ Connection Specification Syntax of connection-spec - (host db user password) + (host db user password &optional port) Description of connection-spec @@ -271,11 +316,95 @@ field. + + port + + String representing the port to use for + communication with the MySQL server. + + + Notes + FDDL + + + + drop-index + requires a table to be specified with the + :on keyword parameter. + + + + + views are not + supported by &mysql;. + + + + + The :transactions keyword argument to + create-table + controls whether or not the created table is an InnoDB + table which supports transactions. + + + + + The :owner keyword argument to the FDDL functions + for listing and testing for database objects is ignored. + + + + + FDML + + + + Prior to version 4.1, &mysql; does not support nested + subqueries in calls to select. + + + + + Symbolic SQL Syntax + + + + &mysql; does not support the || + concatenation operator. Use concat + instead. + + + + + &mysql; does not support the substr + operator. Use substring instead. + + + + + &mysql; does not support the + intersect and + except set operations. + + + + + &mysql; (version 4.0 and later) does not support string + table aliases unless the server is started with + ANSI_QUOTES enabled. + + + + + - + &odbc; @@ -337,6 +466,18 @@ + Notes + FDDL + + + + The :owner keyword argument to the FDDL functions + for listing and testing for database objects is ignored. + + + + + @@ -393,6 +534,11 @@ + Notes + + None. + + @@ -432,6 +578,167 @@ + Notes + Connection + + + + Passing filename a value of + :memory: will create a database in + physical memory instead of using a file on disk. + + + + + Some operations will be many times faster if database + integrity checking is disabled by setting the SYNCHRONOUS + flag to OFF (see the SQLITE manual for details). + + + + + FDDL + + + + The :owner keyword argument to the FDDL functions + for listing and testing for database objects is ignored. + + + + + The :column-list keyword argument to + create-view + is not supported by &sqlite;. + + + + + Symbolic SQL Syntax + + + + &sqlite; does not support the all, + some, any and + exists subquery operations. + + + + + + + + + &sqlite3; + + Libraries The &sqlite3; back-end requires + the &sqlite3; shared library file. Its default file name is + /usr/lib/libsqlite3.so. + + + Initialization + + Use + +(asdf:operate 'asdf:load-op 'clsql-sqlite3) + + to load the &sqlite3; back-end. The database type for the &sqlite3; + back-end is :sqlite3. + + + + Connection Specification + + Syntax of connection-spec + (filename &optional init-function) + + + Description of connection-spec + + + filename + + String representing the filename of the &sqlite3; + database file. + + + + init-function + + + A function designator. + init-function takes a + single argument of type + sqlite3:sqlite3-db, a foreign pointer to + the C descriptor of the newly opened database. + init-function is called by + the back-end immediately after &sqlite3; + sqlite3_open library function, + and can be used to perform optional database + initializations by calling foreign functions in the + &sqlite3; library. + + + An example of an initialization function which + defines a new collating sequence for text columns is + provided in + ./examples/sqlite3/init-func/. + + + + + + + Notes + Connection + + + + Passing filename a value of + :memory: will create a database in + physical memory instead of using a file on disk. + + + + + Some operations will be many times faster if database + integrity checking is disabled by setting the SYNCHRONOUS + flag to OFF (see the SQLITE manual for details). + + + + + FDDL + + + + The :owner keyword argument to the FDDL functions + for listing and testing for database objects is ignored. + + + + + The :column-list keyword argument to + create-view + is not supported by &sqlite3;. + + + + + Symbolic SQL Syntax + + + + &sqlite3; does not support the all, + some, any and + exists subquery operations. + + + + + @@ -442,9 +749,23 @@ library. (libclntsh.so). The location of this library is specified relative to the ORACLE_HOME value in the operating system - environment. &clsql; has tested sucessfully using the client - library from Oracle 9i and Oracle 10g server installations as - well as Oracle's 10g Instant Client library. + environment. + + + + Library Versions + + &clsql; has tested sucessfully using the client library from + Oracle 9i and Oracle 10g server installations as well as + Oracle's 10g Instant Client library. For Oracle 8 and earlier + versions, there is vestigial support by pushing the symbol + :oci7 onto cl:*features* + prior to loading the clsql-oracle &asdf; + system. + + (push :oci7 cl:*features*) + (asdf:operate 'asdf:load-op 'clsql-oracle) + @@ -470,7 +791,7 @@ global-name - String representing the global name of the Orace database. + String representing the global name of the Oracle database. This is looked up through the tnsnames.ora file. @@ -491,6 +812,44 @@ + Notes + Symbolic SQL Syntax + + + + The userenv operator is &oracle; specific. + + + + + &oracle; does not support the except + operator. Use minus instead. + + + + + &oracle; does not support the all, + some, any + subquery operations. + + + + + Transactions + + + + By default, &clsql; starts in transaction AUTOCOMMIT mode + (see set-autocommit). + To begin a transaction in autocommit mode, start-transaction + has to be called explicitly. + + + + +