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
+2012-03-28 Russ Tyndall <russ@acceleration.net>
+
+ * sql/sequences.lisp: [A Patch FROM 2011-07-28 changed sequences.
+ They were previously prefixed with _CLSQL_SEQ_ but are now
+ suffixed with _CLSQL_SEQ. This is likely to break existing
+ implementations using the default sequence names
+
+ setting *old-sequence-names* to T, should force using the older
+ naming scheme
+
2012-03-27 Ryan Davis <ryan@acceleration.net>
* sql/expressions.lisp: Fixed bug with subqueries in the where
2012-03-27 Ryan Davis <ryan@acceleration.net>
* sql/expressions.lisp: Fixed bug with subqueries in the where
* test/: Better, more tests, better type coercion in tests and
throughout (%get-int)
* test/: Better, more tests, better type coercion in tests and
throughout (%get-int)
+ [edit 2012-03-28 - RT]
+ * sql/sequences.lisp: Sequences were previously prefixed with
+ _CLSQL_SEQ_ but are now suffixed with _CLSQL_SEQ. This is likely
+ to break existing implementations using the default sequence names
+
+ setting *old-sequence-names* to T, should force using the older
+ naming scheme
+
2011-07-16 Kevin Rosenberg <kevin@rosenberg.net>
* Version 5.4.0 release
2011-07-16 Kevin Rosenberg <kevin@rosenberg.net>
* Version 5.4.0 release
#:sequence-next
#:sequence-last
#:set-sequence-position
#:sequence-next
#:sequence-last
#:set-sequence-position
;; FDML (fdml.lisp)
#:select
;; FDML (fdml.lisp)
#:select
+(defvar *old-sequence-names* nil
+ "Should CLSQL use its old sequence naming scheme _CLSQL_SEQ_{table} instead
+ of the current scheme {table}_CLSQL_SEQ")
+
(defun %sequence-name-to-table (sequence-name database)
(escaped
(combine-database-identifiers
(defun %sequence-name-to-table (sequence-name database)
(escaped
(combine-database-identifiers
- (list sequence-name 'CLSQL_SEQ)
+ (if *old-sequence-names*
+ (list '_CLSQL_SEQ sequence-name)
+ (list sequence-name 'CLSQL_SEQ))
database)))
(defmethod database-create-sequence (sequence-name database)
database)))
(defmethod database-create-sequence (sequence-name database)
(concatenate 'string "DROP TABLE " (%sequence-name-to-table sequence-name database))
database))
(concatenate 'string "DROP TABLE " (%sequence-name-to-table sequence-name database))
database))
+(defun %seq-name-key ()
+ (if *old-sequence-names*
+ "_CLSQL_SEQ_"
+ "_CLSQL_SEQ"))
+
(defun %table-name-to-sequence-name (table-name)
;; if this was escaped it still should be,
;; if it wasnt it still shouldnt-be
(check-type table-name string)
(defun %table-name-to-sequence-name (table-name)
;; if this was escaped it still should be,
;; if it wasnt it still shouldnt-be
(check-type table-name string)
- (replace-all table-name "_CLSQL_SEQ" ""))
+ (replace-all table-name (%seq-name-key) ""))
(defmethod database-list-sequences (database &key (owner nil))
(declare (ignore owner))
(mapcan #'(lambda (s)
(defmethod database-list-sequences (database &key (owner nil))
(declare (ignore owner))
(mapcan #'(lambda (s)
- (and (search "_CLSQL_SEQ" s :test #'string-equal)
+ (and (search (%seq-name-key) s :test #'string-equal)
(list (%table-name-to-sequence-name s))))
(database-list-tables-and-sequences database)))
(list (%table-name-to-sequence-name s))))
(database-list-tables-and-sequences database)))