X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fclasses.lisp;h=558127ae9bbd28d18e34d702bad90acac53d8a15;hp=7098ca2c81eafb294522578b648d896f0f20782f;hb=23b76563b25a517ad20f29d6dc5a65c8b958a042;hpb=afc88420d03b627b214473078c3adc201de2de80 diff --git a/sql/classes.lisp b/sql/classes.lisp index 7098ca2..558127a 100644 --- a/sql/classes.lisp +++ b/sql/classes.lisp @@ -630,6 +630,9 @@ uninclusive, and the args from that keyword to the end." :initform nil) (modifiers :initarg :modifiers + :initform nil) + (transactions + :initarg :transactions :initform nil)) (:documentation "An SQL CREATE TABLE statement.")) @@ -658,7 +661,7 @@ uninclusive, and the args from that keyword to the end." (when constraints (write-string " " *sql-stream*) (write-string constraints *sql-stream*))))))) - (with-slots (name columns modifiers) + (with-slots (name columns modifiers transactions) stmt (write-string "CREATE TABLE " *sql-stream*) (output-sql name database) @@ -673,7 +676,11 @@ uninclusive, and the args from that keyword to the end." ((null modifier)) (write-string ", " *sql-stream*) (write-string (car modifier) *sql-stream*))) - (write-char #\) *sql-stream*))) + (write-char #\) *sql-stream*) + (when (and (eq :mysql (database-underlying-type database)) + transactions + (db-type-transaction-capable? :mysql database)) + (write-string " Type=InnoDB" *sql-stream*)))) t)