-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using :default option in sxql:create-table #2
Comments
(sxql:yield
(sxql:create-table :users
((user_id :type 'integer
:primary-key t)
(attr :type 'integer
:not-null t
:default 5))))
;=> "CREATE TABLE users (user_id INTEGER PRIMARY KEY, attr INTEGER NOT NULL DEFAULT ?)"
; (5) The parameters should be passed to (dbi:with-connection
(con :postgres :database-name "testDB" :username "user" :password "pass")
(multiple-value-bind (sql binds)
(sxql:yield
(sxql:create-table :users
((user_id :type 'integer
:primary-key t)
(attr :type 'integer
:not-null t
:default 5))))
(dbi:execute (dbi:prepare con sql) binds))) |
The above does NOT work, at least with sqlite3.
Results in:
|
This seems to be because cl-sqlite does not allow it:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: