6 years agoremoved generate-selection-list in favor of a make-select-list
Russ Tyndall [Tue, 20 Nov 2012 20:55:05 +0000 (15:55 -0500)]
removed generate-selection-list in favor of a make-select-list
function and object

 * structures this data and simplifies interactions with it
 * speeds up build-objects (better than pre-refactor levels)
   by caching this data rather than recalculating each iteration

6 years agoRefactored find-all and build-object to be more readable, shorter and
Russ Tyndall [Wed, 21 Nov 2012 18:11:44 +0000 (13:11 -0500)]
Refactored find-all and build-object to be more readable, shorter and
less buggy

 * handles not double referencing inner-join tables now
 * better able to find table references and better at not duplicating
 * removed order-by and distinct from the select-list rather passing
   them as :order-by and :distinct

6 years agoRefactoring join-qualifier for readability
Nathan Bird [Wed, 5 Dec 2012 20:13:46 +0000 (15:13 -0500)]
Refactoring join-qualifier for readability

6 years agoSimplify slotdefs-for-slots-with-class by using existing function.
Nathan Bird [Wed, 5 Dec 2012 18:37:49 +0000 (13:37 -0500)]
Simplify slotdefs-for-slots-with-class by using existing function.

6 years agodocstrings and small rewrite of chain-primary-keys to be iterative instead of recursive
Russ Tyndall [Tue, 20 Nov 2012 22:19:02 +0000 (17:19 -0500)]
docstrings and small rewrite of chain-primary-keys to be iterative instead of recursive

6 years agoadded docstrings and some join-slot-info accessor helper functions
Russ Tyndall [Tue, 20 Nov 2012 20:54:23 +0000 (15:54 -0500)]
added docstrings and some join-slot-info accessor helper functions

6 years agoreworked fault-join-slot & fault-join-normalized-slot to do less work
Russ Tyndall [Mon, 19 Nov 2012 22:00:27 +0000 (17:00 -0500)]
reworked fault-join-slot & fault-join-normalized-slot to do less work

slot-value-using class got a bit cleaner along the way.

6 years agointroduced slot-def kind predicates (eg: join-slot-p key-slot-p)
Russ Tyndall [Tue, 20 Nov 2012 18:59:08 +0000 (13:59 -0500)]
introduced slot-def kind predicates (eg: join-slot-p key-slot-p)

6 years agomade the datetest table have a key column so that update-records-from-* works again
Russ Tyndall [Mon, 19 Nov 2012 21:55:24 +0000 (16:55 -0500)]
made the datetest table have a key column so that update-records-from-* works again

6 years agomade direct and effective slot-definitions contain the same db-info hash
Russ Tyndall [Mon, 19 Nov 2012 21:54:53 +0000 (16:54 -0500)]
made direct and effective slot-definitions contain the same db-info hash

6 years agorefactor update-records-from-* functions to utilize a single codepath
Russ Tyndall [Wed, 14 Nov 2012 21:23:45 +0000 (16:23 -0500)]
refactor update-records-from-* functions to utilize a single codepath
rather than reimplementing things differently in each

 * major clean up of normalized classes code - not many tests for
   this so if its being used by you please check carefully
 * should be a single update code path that each of the other methods
   feed into
 * less different iteration forms, I found almost all the iteration
   constructs in the language being used, opted to try an standardize
   on loop since it was already being used and tends to produce more
   efficient code
 * objects instead of unstructured lists
 * smaller, hopefully easier to understand functions

6 years agoadded dates/times to the parameter value coersion and pulled this into
Russ Tyndall [Tue, 30 Oct 2012 15:55:28 +0000 (11:55 -0400)]
added dates/times to the parameter value coersion and pulled this into
a new generic prepare-sql-parameter

6 years agoignore some unused variables, two less style warnings
Ryan Davis [Thu, 13 Sep 2012 17:27:13 +0000 (13:27 -0400)]
ignore some unused variables, two less style warnings

6 years agoAutomated commit for upstream build of version 6.3.0 debian-6.3.0-1 v6.3.0
Kevin M. Rosenberg [Tue, 4 Sep 2012 23:12:40 +0000 (17:12 -0600)]
Automated commit for upstream build of version 6.3.0

6 years agoRelease 6.3
Kevin M. Rosenberg [Tue, 4 Sep 2012 23:07:49 +0000 (17:07 -0600)]
Release 6.3

6 years agomerged current-test-results and LATEST-TEST-RESULTS into a single file in the root
Russ Tyndall [Tue, 4 Sep 2012 19:36:13 +0000 (15:36 -0400)]
merged current-test-results and LATEST-TEST-RESULTS into a single file in the root

6 years agoAdded a current-test-results.txt file to keep track of the current state of the test...
Russ Tyndall [Tue, 4 Sep 2012 19:20:23 +0000 (15:20 -0400)]
Added a current-test-results.txt file to keep track of the current state of the test suite

6 years agoTry to respect the casing of symbols where it seems intentional (ie:
Russ Tyndall [Tue, 4 Sep 2012 17:29:49 +0000 (13:29 -0400)]
Try to respect the casing of symbols where it seems intentional (ie:
is not default).

This should fix a failing test case, and I think behaves more
understandibly. If you specify a casing '|Foo Bar| let us treat that a
string "Foo Bar" and output it escaped

6 years agoensure the sqlite database name is a string (and not a pathname)
Ryan Davis [Thu, 30 Aug 2012 20:18:53 +0000 (16:18 -0400)]
ensure the sqlite database name is a string (and not a pathname)

6 years agouse &body instead of &rest to aid emacs indentation
Ryan Davis [Tue, 28 Aug 2012 18:36:09 +0000 (14:36 -0400)]
use &body instead of &rest to aid emacs indentation

6 years agoallow pathnames as well as strings in sqlite3 connection specs
Ryan Davis [Tue, 28 Aug 2012 18:13:40 +0000 (14:13 -0400)]
allow pathnames as well as strings in sqlite3 connection specs

7 years agoChange log entry for shadowing postgresql-notification
Russ Tyndall [Fri, 17 Aug 2012 15:44:30 +0000 (11:44 -0400)]
Change log entry for shadowing postgresql-notification

7 years agoshadow postgresql-notification for compatibility with new cl-postgres (Thanks Zach)
Russ Tyndall [Fri, 17 Aug 2012 15:41:13 +0000 (11:41 -0400)]
shadow postgresql-notification for compatibility with new cl-postgres (Thanks Zach)

7 years agoMerge branch 'master' of
Ryan Davis [Tue, 31 Jul 2012 13:52:49 +0000 (09:52 -0400)]
Merge branch 'master' of

7 years agocomment fix and added a TODO, some connection pooling scenarios
Ryan Davis [Thu, 26 Jul 2012 20:59:52 +0000 (16:59 -0400)]
comment fix and added a TODO, some connection pooling scenarios
can lose autocommit configuration

7 years agocomment fix and added a TODO, some connection pooling scenarios
Ryan Davis [Thu, 26 Jul 2012 20:59:52 +0000 (16:59 -0400)]
comment fix and added a TODO, some connection pooling scenarios
can lose autocommit configuration

7 years agofixed a bug where the order by was being destructively modified,
Russ Tyndall [Mon, 9 Jul 2012 21:11:54 +0000 (17:11 -0400)]
fixed a bug where the order by was being destructively modified,
causing odd caching issues when the selected object was not statically
known (eg unreferenced tables could show up in the query if they were
cached by a previous call through this function.  I replaced this code
with a non-destructive variant which should solve this.

Thanks to Philipp Marek for the bug report

7 years agodequote database-identifiers and autoincrement-sequence
Russ Tyndall [Mon, 25 Jun 2012 15:09:44 +0000 (11:09 -0400)]
dequote database-identifiers and autoincrement-sequence

 * we can handle symbols, so we can probably handle quoted symbols
 * slot-definition initargs seem to some in unevaluated, so lets handle
   people doing the obvious thing and puting a quote in front of their symbols

7 years agoChanged compute-effective-slot-definition to correctly copy the
Russ Tyndall [Fri, 22 Jun 2012 15:14:47 +0000 (11:14 -0400)]
Changed compute-effective-slot-definition to correctly copy the
autoincrement-sequence slot to the ESD previously it was being skipped
(seemingly by accident).

Thanks to flip214 on #lisp for the bug report

7 years agouse with-output-to-string instead of progv
Ryan Davis [Tue, 15 May 2012 20:13:15 +0000 (16:13 -0400)]
use with-output-to-string instead of progv

7 years agoAdding a section to the README about contributing.
Nathan Bird [Wed, 9 May 2012 14:51:47 +0000 (10:51 -0400)]
Adding a section to the README about contributing.

7 years agoMerge branch 'master' of ssh://
Kevin M. Rosenberg [Thu, 26 Apr 2012 16:17:56 +0000 (10:17 -0600)]
Merge branch 'master' of ssh://

7 years agoVersion 6.2 release
Kevin M. Rosenberg [Thu, 26 Apr 2012 15:14:50 +0000 (09:14 -0600)]
Version 6.2 release

7 years agoUpdating version number in asd to reflect recent development.
Nathan Bird [Thu, 26 Apr 2012 14:46:56 +0000 (10:46 -0400)]
Updating version number in asd to reflect recent development.

7 years agoadded (*in-subselect* t) bindings around rendering out update/insert values
Russ Tyndall [Wed, 25 Apr 2012 16:24:30 +0000 (12:24 -0400)]
added (*in-subselect* t) bindings around rendering out update/insert values

7 years agoAdding some (incomplete) information about the current state of thread-safety.
Nathan Bird [Wed, 25 Apr 2012 15:25:31 +0000 (11:25 -0400)]
Adding some (incomplete) information about the current state of thread-safety.

7 years agoMysql > CREATE TABLE: use 'engine' keyword instead of 'type'.
Nathan Bird [Tue, 24 Apr 2012 15:49:08 +0000 (11:49 -0400)]
Mysql > CREATE TABLE: use 'engine' keyword instead of 'type'.

7 years agoRevert "If running on a threaded lisp try loading libmysqlclient_r"
Nathan Bird [Tue, 24 Apr 2012 14:57:42 +0000 (10:57 -0400)]
Revert "If running on a threaded lisp try loading libmysqlclient_r"

This reverts commit 7127589ca079f4f4279be601ebd272b7488906b4.

While I think this might be right, I've not gotten a chance to test
this at all. Aside from that, on my system (ubuntu 12.04 x86_64) both
versions symlink to the same shared object.

7 years agoBug in sequence names was reported by Jan Tolenaar.
Russ Tyndall [Wed, 28 Mar 2012 18:11:22 +0000 (14:11 -0400)]
Bug in sequence names was reported by Jan Tolenaar.

We changed the naming scheme inadvertently.  Added a flag
*old-sequence-names* to force use of the old naming scheme.  Hopefully
this will not break for anyone relying on the new naming scheme

7 years agomerging changelog
Ryan Davis [Tue, 27 Mar 2012 20:21:39 +0000 (16:21 -0400)]
merging changelog

7 years agoupdated changelog
Ryan Davis [Tue, 27 Mar 2012 20:18:23 +0000 (16:18 -0400)]
updated changelog

7 years agoconvered orphan sql-ident-table test function to use RT and run with
Ryan Davis [Tue, 27 Mar 2012 20:06:27 +0000 (16:06 -0400)]
convered orphan sql-ident-table test function to use RT and run with
the rest of the syntax tests (and fail)

Had to fix some package references, and uses backquote to splice
together the a decent deftest form without being overly verbose. Also
used clsql:sql instead of calling output-sql directly.

Currently fails by not preserving case when using a symbol like '|foo|
as the table name, we're getting "FOO" not "foo".

7 years agoadd 3 new syntax tests for subqueries in SELECT, UPDATE,
Ryan Davis [Tue, 27 Mar 2012 19:42:39 +0000 (15:42 -0400)]
add 3 new syntax tests for subqueries in SELECT, UPDATE,
and DELETE statements.

Had to use clsql-sys unexported symbols for sql-delete
and sql-update because clsql:sql-operation does not support

7 years agoadded change log entry for the last two patches
Russ Tyndall [Mon, 26 Mar 2012 21:03:47 +0000 (17:03 -0400)]
added change log entry for the last two patches

7 years agouse output-sql-where-clause when rendering update statements
Ryan Davis [Mon, 26 Mar 2012 19:57:24 +0000 (15:57 -0400)]
use output-sql-where-clause when rendering update statements

7 years agofix SQL syntax errors when using subqueries in WHERE clauses of DELETE or UPDATE...
Ryan Davis [Mon, 26 Mar 2012 19:52:13 +0000 (15:52 -0400)]
fix SQL syntax errors when using subqueries in WHERE clauses of DELETE or UPDATE statements.

A similar issue was fixed for SELECTs in b06efa82, this patch pulls WHERE clause printing
into a seperate function called by the different output-sql methods.

7 years agoupdate clsql-odbc docs to explain the :connection-string connection argument.
Ryan Davis [Fri, 23 Mar 2012 18:54:20 +0000 (14:54 -0400)]
update clsql-odbc docs to explain the :connection-string connection argument.

7 years agofix typos in the ChangeLog
Ryan Davis [Fri, 23 Mar 2012 18:53:51 +0000 (14:53 -0400)]
fix typos in the ChangeLog

7 years agoIf running on a threaded lisp try loading libmysqlclient_r
Nathan Bird [Wed, 22 Feb 2012 21:59:23 +0000 (16:59 -0500)]
If running on a threaded lisp try loading libmysqlclient_r

7 years agoRemoving odbc::%cstring-into-vector -- unused and unreliable.
Nathan Bird [Fri, 6 Jan 2012 21:39:09 +0000 (16:39 -0500)]
Removing odbc::%cstring-into-vector -- unused and unreliable.

The idea of the function was to copy out of c string memory into a
lisp string a byte at a time, converting to lisp characters as we go.

 * this doesn't work with multibyte charsets
 * the underlying deref-array funcall would sometimes pull the entire
   array into lisp to then get at the single element-- for each element.
 * set elements in the lisp array using schar but there's no guarantee
   that the lisp array is a simple-string. Newer SBCL's err on this.

7 years agoRewrote ODBC's read-data-in-chunks to handle multibyte characters.
Nathan Bird [Fri, 6 Jan 2012 21:36:22 +0000 (16:36 -0500)]
Rewrote ODBC's read-data-in-chunks to handle multibyte characters.

This function is called on large (greater than +max-precision+) fields
and was previously converting to lisp characters one at time with no
regard for encoding.  The new method uses 2x more memory as it uses an
extra copy of the string (in pieces) but at least it returns correct

Added a test case that shows the problem (now fixed).

7 years agoHandle sql decimal type identically to sql numeric type--read into a double.
Nathan Bird [Thu, 5 Jan 2012 22:33:40 +0000 (17:33 -0500)]
Handle sql decimal type identically to sql numeric type--read into a double.

7 years agoFixed bug reported by JTK related to the not-null sql-expression
Russ Tyndall [Tue, 13 Dec 2011 14:13:25 +0000 (09:13 -0500)]
Fixed bug reported by JTK related to the not-null sql-expression
especially as used in conjunction with the is operator

Made null called with more than one argument throw an exception
instead of silently discarding all arguments past the first

7 years agoFixup ODBC :connection-string codepath.
Nathan Bird [Wed, 4 Jan 2012 20:37:15 +0000 (15:37 -0500)]
Fixup ODBC :connection-string codepath.

In the call to odbc's SQLDriverConnect default the WindowHandle
argument to a null ptr so that connecting with :connection-string will
work in the default case of SQL_DRIVER_NOPROMPT.

I.e. you can now do things like: (clsql:connect '("DsnName" "UserName"
"" :connection-string
:database-type :odbc))

I believe the DsnName and Username at that point are only used when
printing the connection information.

When connecting with ODBC :connection-string argument default the
window-handle (for popping up a prompt) to the null ptr in the case
that one hasn't been passed in.

The default is to tell the driver library not to prompt so it doesn't
really need a window handle, it just needs it to be a null ptr rather
than nil.

7 years agoFix typo in recent 6.1.0
Kevin M. Rosenberg [Wed, 21 Dec 2011 02:59:33 +0000 (19:59 -0700)]
Fix typo in recent 6.1.0

7 years agoOracle foreign encoding fix debian-6.1.0-1 v6.1.0
Kevin M. Rosenberg [Mon, 19 Dec 2011 17:14:55 +0000 (10:14 -0700)]
Oracle foreign encoding fix
2011-12-20  Kevin Rosenberg <>
* db-oracle/oracle.lisp: Change length function to
uffi:foreign-string-length to handle foreign encodings.

7 years agoExport the new symbol: *time-format*.
Nathan Bird [Thu, 1 Dec 2011 21:55:25 +0000 (16:55 -0500)]
Export the new symbol: *time-format*.

7 years agoIn ODBC backend, avoid going through the common lisp universal time
Russ Tyndall [Mon, 28 Nov 2011 22:44:20 +0000 (17:44 -0500)]
In ODBC backend, avoid going through the common lisp universal time
type (because it lacks support for historic dates) when doing date
conversions.  Instead use CLSQL date/time types.

*time-conversion-function* renamed to *time-format*

Patch from: Francisco Vides Fernandez

7 years agoMerge branch 'master' of
Russ Tyndall [Mon, 28 Nov 2011 22:13:51 +0000 (17:13 -0500)]
Merge branch 'master' of

7 years agoadded some more documentation on command-object
Ryan Davis [Tue, 15 Nov 2011 15:54:24 +0000 (10:54 -0500)]
added some more documentation on command-object

7 years agoadded nvarchar to the possible sql-to-c-types for ODBC backend
Russ Tyndall [Tue, 18 Oct 2011 21:21:49 +0000 (17:21 -0400)]
added nvarchar to the possible sql-to-c-types for ODBC backend

7 years agoAutomated commit for upstream build of version 6.0.1 debian-6.0.1-1 v6.0.1
Kevin M. Rosenberg [Wed, 21 Sep 2011 16:58:27 +0000 (10:58 -0600)]
Automated commit for upstream build of version 6.0.1

7 years agoadded changelog entry describing previous bug fix
Russ Tyndall [Mon, 12 Sep 2011 17:48:12 +0000 (13:48 -0400)]
added changelog entry describing previous bug fix

7 years agofixed a bugs in list-attribute(s|-types) in fddl that I introduced
Russ Tyndall [Mon, 12 Sep 2011 15:13:27 +0000 (11:13 -0400)]
fixed a bugs in list-attribute(s|-types) in fddl that I introduced
with %database-identifier stuff (essentially I need unquoted column
names but was passing around quoted ones).  Pass around
%database-identifiers instead and only get the un/escaped version as
you are about to stick it in a query.

8 years agoAutomated commit for upstream build of version 6.0.0 debian-6.0.0-1 v6.0.0
Kevin M. Rosenberg [Wed, 3 Aug 2011 14:49:41 +0000 (08:49 -0600)]
Automated commit for upstream build of version 6.0.0

8 years agoCLSQL 6.0.0 release
Kevin M. Rosenberg [Wed, 3 Aug 2011 14:48:55 +0000 (08:48 -0600)]
CLSQL 6.0.0 release

8 years agouse file-enable in tests to make it harder to get the syntax enable/disabling wrong
Russ Tyndall [Tue, 2 Aug 2011 17:29:24 +0000 (13:29 -0400)]
use file-enable in tests to make it harder to get the syntax enable/disabling wrong

8 years agoadded changelog entry for the merged patch stack
Russ Tyndall [Thu, 28 Jul 2011 17:22:42 +0000 (13:22 -0400)]
added changelog entry for the merged patch stack

8 years agoMerge branch 'accel-2'
Russ Tyndall [Wed, 27 Jul 2011 20:14:20 +0000 (16:14 -0400)]
Merge branch 'accel-2'

8 years agowrite out postgresql-socket-3 parameter values to the recording stream (when we write...
Russ Tyndall [Mon, 25 Jul 2011 19:46:52 +0000 (15:46 -0400)]
write out postgresql-socket-3 parameter values to the recording stream (when we write out command object expressions)

8 years agoVersion 5.4.0 release debian-5.4.0-1 v5.4.0
Kevin M. Rosenberg [Sat, 16 Jul 2011 15:19:56 +0000 (09:19 -0600)]
Version 5.4.0 release

8 years agofixed type-dec on substitute-string-for-char so that nil arg value returns nil as...
Russ Tyndall [Thu, 7 Jul 2011 18:41:17 +0000 (14:41 -0400)]
fixed type-dec on substitute-string-for-char so that nil arg value returns nil as previously

8 years agoAdding to utils make-weak-hash-table for use in caches.
Nathan Bird [Mon, 4 Jul 2011 19:40:44 +0000 (15:40 -0400)]
Adding to utils make-weak-hash-table for use in caches.

Currently used for
 * *output-hash*: caching generated SQL strings
 * oodml records cache

8 years agorequiring ownership isn't integral and causes it to fail
Nathan Bird [Fri, 1 Jul 2011 19:40:17 +0000 (15:40 -0400)]
requiring ownership isn't integral and causes it to fail

8 years agoAnother test that depends on auto-increment
Nathan Bird [Fri, 1 Jul 2011 19:39:52 +0000 (15:39 -0400)]
Another test that depends on auto-increment

8 years agorefactor the way oodml find-all and select deal with their keyword args.
Nathan Bird [Fri, 1 Jul 2011 18:39:34 +0000 (14:39 -0400)]
refactor the way oodml find-all and select deal with their keyword args.

 * introduce filter-plist for filtering key-value pairs out of a plist.
 * switch some (apply #'some-fun (append args (list :key val)))
            to (apply #'some-fun :key val args)
       where we know the key isn't in the args list

8 years agoA few type declarations
Nathan Bird [Fri, 1 Jul 2011 18:16:25 +0000 (14:16 -0400)]
A few type declarations

8 years agoadded output-caching tests to ensure that the output cache works correctly and can...
Russ Tyndall [Fri, 1 Jul 2011 18:41:36 +0000 (14:41 -0400)]
added output-caching tests to ensure that the output cache works correctly and can be disabled

8 years agoignore emacs #foo.lisp# autosave files
Nathan Bird [Thu, 30 Jun 2011 21:09:46 +0000 (17:09 -0400)]
ignore emacs #foo.lisp# autosave files

8 years agoAdding todo
Nathan Bird [Wed, 29 Jun 2011 18:47:51 +0000 (14:47 -0400)]
Adding todo

8 years agoMaking :basic/bigtext/2 a stronger test
Nathan Bird [Wed, 29 Jun 2011 18:32:51 +0000 (14:32 -0400)]
Making :basic/bigtext/2 a stronger test

8 years agowhitespace for readability
Nathan Bird [Wed, 29 Jun 2011 18:27:49 +0000 (14:27 -0400)]
whitespace for readability

8 years agoA pass over the connection pool trying to make sure the locked scopes are as narrow...
Nathan Bird [Thu, 30 Jun 2011 20:45:05 +0000 (16:45 -0400)]
A pass over the connection pool trying to make sure the locked scopes are as narrow as possible.

8 years agoSuite of new tests for connection pool operations.
Ryan Davis [Mon, 27 Jun 2011 19:04:20 +0000 (15:04 -0400)]
Suite of new tests for connection pool operations.

Also introduced dummy backend to aide running tests not about database backends.

8 years agoadds another testing path that is run without any open database connection, meant...
Ryan Davis [Mon, 27 Jun 2011 18:16:34 +0000 (14:16 -0400)]
adds another testing path that is run without any open database connection, meant to test internals.

Internal-only test suites need to be added to INTERNAL-SUITES (a peer to DEFAULT-SUITES).  Internal-suites are not run against db backends.

8 years agoFixup read-data-in-chunks a bit to use helper functions and whitespace
Nathan Bird [Wed, 29 Jun 2011 19:00:41 +0000 (15:00 -0400)]
Fixup read-data-in-chunks a bit to use helper functions and whitespace

8 years agoBUG FIX update-records-from-instance threw errors if pkey-slot was unbound
Russ Tyndall [Sun, 19 Jun 2011 17:25:58 +0000 (13:25 -0400)]
BUG FIX update-records-from-instance threw errors if pkey-slot was unbound

8 years agoBUGFIX: when read-data-in-chunks had an off-by-1 error when dealing with strings...
Nathan Bird [Wed, 29 Jun 2011 18:56:57 +0000 (14:56 -0400)]
BUGFIX: when read-data-in-chunks had an off-by-1 error when dealing with strings of length (1+ +max-precision+).

8 years agoOptimize odbc::%cstring-to-vector on sbcl if cffi isn't loaded.
Russ Tyndall [Fri, 17 Jun 2011 21:53:45 +0000 (17:53 -0400)]
Optimize odbc::%cstring-to-vector on sbcl if cffi isn't loaded.

It now uses sb-sys:sap-ref-8 instead of sb-alien:deref (via
uffi:deref-array) based on what we found CFFI using.

This makes the ODBC backend a couple orders of magnitude faster when
talking strings to MSSQL.

TODO: figure out how to make this change in UFFI or sb-alien so that
more places can benefit from this speed improvement

8 years agoadd %get-int to handle type-coersion to int and use it in generic-postgres
Russ Tyndall [Sun, 12 Jun 2011 16:19:12 +0000 (12:19 -0400)]
add %get-int to handle type-coersion to int and use it in generic-postgres
and throughout tests to simplify integer coersion, and allow
postgresql-socket3 to pass tests. (postgresql-socket3 always returns the
correct type, rather than sometimes returning strings)

8 years agostopped lisp symbols as values from being able to inject sql (SECURITY BUG)
Russ Tyndall [Wed, 22 Jun 2011 14:43:02 +0000 (10:43 -0400)]
stopped lisp symbols as values from being able to inject sql (SECURITY BUG)

Fixed some more places where we should have been using escaped-database-identifier

8 years agochanged generate-sql-reference to read [foo bar] and [] as the same attribute...
Russ Tyndall [Sun, 12 Jun 2011 15:58:39 +0000 (11:58 -0400)]
changed generate-sql-reference to read [foo bar] and [] as the same attribute expression

8 years agofixed some bugs with sql-expression caching and made it possible to
Russ Tyndall [Thu, 30 Jun 2011 19:40:25 +0000 (15:40 -0400)]
fixed some bugs with sql-expression caching and made it possible to
disable this system

8 years agoMajor rewrite of table/column name output escaping system wide.
Russ Tyndall [Mon, 24 Aug 2009 21:14:09 +0000 (17:14 -0400)]
Major rewrite of table/column name output escaping system wide.

Centralized logic in database-identifier that returns
database-identifier objects.  These allow us to coerce to a canonical
output name and have both its escaped and unescaped version available.
Previously the logic for converting from various sql-expressions,
symbols and strings into names that will be sent to the database, was
done all over the place and with different logic in each location


8 years agomade odbc read (from c) decimals and numerics as doubles instead of
Russ Tyndall [Thu, 9 Jun 2011 18:27:53 +0000 (14:27 -0400)]
made odbc read (from c) decimals and numerics as doubles instead of

TODO: Read these numbers in as rationals instead of floats

8 years agoallow update-record-from-slots to accept slot names or slot
Russ Tyndall [Thu, 9 Jun 2011 18:04:47 +0000 (14:04 -0400)]
allow update-record-from-slots to accept slot names or slot
definitions (by improving slotdef-for-slot-with-class)

8 years agofixed :from clauses to not throw errors when presented with a string or string expression
Russ Tyndall [Thu, 24 Feb 2011 18:39:02 +0000 (13:39 -0500)]
fixed :from clauses to not throw errors when presented with a string or string expression

8 years agochanged how where clauses are output to ensure that we do not output a
Russ Tyndall [Mon, 5 Oct 2009 15:12:20 +0000 (11:12 -0400)]
changed how where clauses are output to ensure that we do not output a
"where" sql keyword when we will not output a clause. (Some
expressions might produce an empty string in some cases (an and
without any children comes to mind)).

  prev: 814ef0649edf23f0136d5cad2d7738ae72e79871

8 years agomade select accept a parameters argument.
Russ Tyndall [Wed, 8 Jun 2011 21:12:57 +0000 (17:12 -0400)]
made select accept a parameters argument.

If parameters are supplied, it builds a command object and executes
that instead of the flat query.  This allows you to return objects and
use parameters

  prev: 8b4602546d876db6e9853635d694de1993214127

8 years agoimproved and moved command object up to clsql (out of cl-postgres-socket3)
Russ Tyndall [Wed, 8 Jun 2011 21:05:47 +0000 (17:05 -0400)]
improved and moved command object up to clsql (out of cl-postgres-socket3)

 * added command-object fn
 * added reset-command-object
 * command-objects: made nil be treated as "null" in the database by default instead of "false". To pass false use :false or :f

 prev: d704ea35ebc38b6b9efd5cbb0417d0340bee3c5c