2008-09-01 (1.1.012) Dmitriy Ivanov * acl-compat directory removed from the distribution bundle and should be loaded as a separate system from now on (only tester is used for regression tests); * sql/object-oriented.lisp: signature of find-join-object changed to (instance prototype &optional arg &rest args). * The initial value of *default-read-binary-type* has changed to octet-vector. * expressions.lips ++ added #. * odbc-descriptors.lisp: function %describe-lisp-object: ** octet-vector is accepted in %describe-lisp-object. ** as type simple-bit-vector is treated as BINARY (cf. bit-vector as VARBINARY), its column size is always taken form ODBC when possible. * ffc-lispworks.lisp ** function %get-binary treats simple-bit-vector similarly to bit-vector from now. 2007-05-01 (1.1.011) Dmitriy Ivanov * Adopted and tested on LWW 5.0, made more CommonSQL compliant + role-privileges.lisp (preliminary version) added - the following functions added to the functional interface: ++ create-role, drop-role, ++ create-user, drop-user, ++ grant-role, revoke-role, ++ grant, revoke. * transactins.lisp ++ added macros define-commit-action and define-rollback-action ++ added after methods on db-end-transaction executing action lists. * object-oriented.lisp ++ added generics db-delete-instance-records, db-update-record-from-slot, and db-update-records-from-instance to ystok.sql.sys package. ** delete-instance-records, update-record-from-slot, and update-records-from-instance "demoted" from generic to ordinary functions. ++ added generic db-class-to-allocate to determine dynamically what class should be instance of. Useful for storing the extension of several subclasses in a single database table (so called "flat mapping"). * syntax.lisp ** the pseudo operator [function ...] has been renamed to [sql-function ...] to avoid potential name clashes with database identifiers as per CommonSQL 5.0. 2007-05-01 (1.0.010) Dmitriy Ivanov * Fixed ysql.asdf. + Added support of the lisp-type character, which is stored as string in database and converted back to a Lisp character (null string is mapped to #\Space). ** odbc/odbc-descriptors.lisp: altered %describe-lisp-object and %read-datum; ** sql/expressions.lisp: for character, db-sql-type-specifier defaults length to 1. * conditions.lisp: for sql-invalid-spec-error and sql-connection-error * slot and reader database-type renamed to db-type, * added initarg :database-type. + Added timeout key parameter to several functions of the functional interface: * connect (implemented via SQL_ATTR_LOGIN_TIMEOUT); * query (select and other variants), execute-command, prepare-statement etc. (implemented via SQL_ATTR_QUERY_TIMEOUT). * Bug fixed in (deftype universal-time) - negative integers are also accepted! + Added rest parameter to sql-create-table-exp to accommodate a plist of DMBS-specific options for the "CREATE TABLE" statement. + Added (defgeneric time-to-time-wo-zone) in odbc-descriptors.lisp * Renamed time-to-universal-time to time-wo-zone-to-universal-time * odbc-local-time.lisp bug fixed in macro time-wo-zone-to-local-time * (defparameter *time-encode-function*) is only used without local-time. + Added method (output-sql sql-case-exp database) for generic database. + tests/ added test for CASE operator family. * utils.lisp: round-sql family was renamed to math-round-sql, and sql-round to math-sql-fround. * object-oriented.lisp ++ accepted the FROM key argument in object-oriended select - it should mention "ordinary" tables/views that could be theta-joined with the ones extracted form the view class selections via the WHERE condition; ++ sql:select accepts "ordinary" selections after class names; they must refer to FROM-tables/views; ++ augmented update-record-from-slot and update-slot-from-record to operate on a join slot; ++ added generic function find-join-object; ++ added db-datum-value, slot-value-to-datum and %sd-value-... family internals; ** renamed value-to-sql to db-sql-value and changed signature; ** changed signature for slot-value-to-sql and set-slot-value-from-datum; ** allocate-db-object no longer initializes standard slots. 2006-10-05 (0.4.009) Dmitriy Ivanov * Fourth release + Added subdirectory tests/ containing test suite based on the acl-compat tester. + Added sql:universal-time type specifier, which is mapped to the database TIMESTAMP type. + Added file sql/helpers.lisp containing SQL identifier basic constructors and a few of shared functions. + Added class sql-set-query-exp and set-operation for the select function to support set operations UNION, INTERSECT, EXCEPT (sql/syntax.lisp, sql/expression.lisp). + Added generic function db-identifier-case to construct SQL identifiers from Lisp symbols properly (sql/generics.lisp, sql/helpers.lisp). + Added condition sql-undefined-function-warning; there is no longer need to define every back-end-specific function with defsql-function, but now it warns in sql-funcall (sql/syntax.lisp) instead of signaling sql-reader-error. * sql/functional.lisp: + added create-database, destroy-database, list-databases, status. + added attribute-type. + added list-views, view-exists-p, + added specialized db-create-view method for Jet 3.5 databases. + added the :result-types keyword argument to functions query, select, and relatives. * documented treatment of the function argument of map-query depending on flatp. * improved print-query computing sizes automatically. * with-transaction macro and low-level generics: + added access-mode and isolation-level parameters; * renamed begin-transaction to start-transaction and db-begin-transaction to db-start-transaction; * fixed restoring autocommit mode on ending transaction. * Renamed db-data-sources to db-list. * error-id mapped to sql-state, and secondary-error-id to the native DMBS error. * sql/object.lisp: * bug fixed in the function join-slot-value-fault when both target-slot and set are null. * sql/syntax.lisp: * bug fixed in sql-open-reader that signaled odd errors when parsing code under conditional notation #- * bug fixed in the function sql-case-exp for back-end specific operators, e.g. NVL. * Renamed files: * sql/object.lisp to sql/object-oriented.lisp * ffc/lispworks/ff-compatibility-lw.lisp to ffc/lispworks/ffc-lispworks.lisp * odbc/odbc-object.lisp to odbc/odbc-object-oriented.lisp * Various fixes and SQL standard conformance improvements. * bug fixed odbc::%get-sbigint - on LispWorks (safety 0) is no-no for bignums. 2006-06-08 (0.3.008) Dmitriy Ivanov * Third release + Added ysql.asd. + Tested against Oracle 10.1 with InstantClient 10.1 and 10.2. + Tested against PostgreSQL 8.1.1 with psqlODBC ANSI driver 8.1.0106. + Tested against SQLite 3.3 with sqlite3odbc driver 0.66. + Object-oriented DDL and DML added for LispWorks + sql/metaobjects.lisp + sql/object.lisp * Renames: * user-id slot with initarg :user-id and accessor db-user-id pervasively replaced by user-name with initarg :user and accessor user-name. * the accessor db-password replaced by password. * errno slot replaced by error-id. + secondary-error-id slot added and mapped to sql-state for ODBC. * sql/functional.lisp: insert-records and update-records + the columns parameter introduced as a synonym to attributes. + the cv-alist parameter introduced; the corresponding argument can be given as ((column . value) ...) instead of the standard av-pairs. + Introduced the desktop-mixin class covering several Jet database subclasses: access-database, excel-database, etc. + Introduced a hashtable for coalescing SQL references. + Added sql-case-exp covering three operators CASE, COND and COALESCE (analogous to ODBC IFNULL, Jet's Nz, Oracle's NV); for Jet desktop drivers, expanded into nested iif(). + Added ODBC SQL_NUMERIC type support in full; the *default-read-numeric-type* parameter defaults to ratio and controls the kind of a lisp object to fetch. + Added ODBC SQL_BIGINT type support. * odbc/odbc-local-time.lisp: * fixed bug in macro date-to-local-time. + added support of SQL_TYPE_DATE in full. * ff-compatibility-lw.lisp: + Added and exported initialize-ffc-locale. * +null-ptr+ replaced by *null-pointer* (for LW4.4, just imported from fli), * improved speed due to copying Lisp<->C array by fli:replace-foreign-array, using ef:find-external-char to deal with conversion, and eliminating type casting during foreign pointer dereference. + introduced SQL-BYTE and SQL-OCTET foreign types. * Thorough use of foreign ffc:SQL- in odbc/ code for better compatibility. * Restructured dbms-specific code. * Minor fixes and performance improvements. 2004-04-02 (0.2.007) * ff-compatibility-lw.lisp : for two define-.. macros added support of dspec:def and dspec:define-dspec-alias. 2004-03-19 (0.2.006) * sql/functional.lisp > function connect > call find-database: Try to extract :user-id first from args, then from connection-spec. * sql/loop.lisp : Fixed bug of insufficient variable bindings while destructuring (loop for (c1 c2 ...) being each record of ...) * odbc/odbc-descriptors.lisp > %make-row-descriptor Provided the defualt 1 for the start-column parameter if it is given nil. * odbc/odbc-sql.lisp > methods (db-open-cursor (odbc-database t)), (db-query (odbc-database t)): Obtain statement with class name odbc-param-cursor instead of the wrong param-cursor. 2004-01-19 (0.2.005) * odbc/odbc-basics.lisp, odbc-functions.lisp fixes (thanks to Andreas Holz): * The definition of odbc-warning condition missed errno and other slots; added sql-database-condition as a superclass. * %make-diag-records: a fixnum 'upto' was guaranteed for record-number variable, also we bypass null values returned from other calls of %sql-get-diag-field. 2003-12-12 (0.2.004) + sql/loop.lisp : Implements loop extension for LispWorks. * sql/functional.lisp : print-query implemented indeed. 2003-12-08 (0.2.003) Dmitriy Ivanov * Second release. 2003-10-23 (0.1.002) * The bracket syntax :limit keyword support is implemented by setting the SQL_ATTR_MAX_ROWS statement attribute. * syntax.lisp: *sql-readtable* introduced and exported. 2003-05-23 (0.1.001) Dmitriy Ivanov * Initial release.