branch: elpa/emacsql
commit cd5e856ea6a9c7675bca68876bf438a69f0a621a
Author: Christopher Wellons <well...@nullprogram.com>
Commit: Christopher Wellons <well...@nullprogram.com>

    Add :autoincrement.
---
 README.md  | 5 +++--
 emacsql.el | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 6e85073a9a..d6d22ed5fa 100644
--- a/README.md
+++ b/README.md
@@ -60,8 +60,9 @@ can either be just this symbol or it can include constraints. 
Because
 Emacsql stores entire lisp objects as values, the only relevant (and
 allowed) types are `integer`, `float`, and `object` (default).
 
-Columns constraints include `:primary` (aka `PRIMARY KEY`), `:unique`,
-`:non-nil` (aka `NOT NULL`), `:default`, and `:check`.
+Columns constraints include `:primary` (aka `PRIMARY KEY`),
+`:autoincrement`, `:unique`, `:non-nil` (aka `NOT NULL`), `:default`,
+and `:check`.
 
 Table constraints can be `:primary`, `:unique`, `:check`, and `:foreign`.
 
diff --git a/emacsql.el b/emacsql.el
index c79d90b70e..3449777253 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -424,6 +424,7 @@ definitions for return from a `emacsql-defexpander'."
         (let ((next (pop column)))
           (cl-case next
             (:primary (push "PRIMARY KEY" output))
+            (:autoincrement (push "AUTOINCREMENT" output))
             (:non-nil (push "NOT NULL" output))
             (:unique  (push "UNIQUE" output))
             (:default (push "DEFAULT" output)

Reply via email to