emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 85076dfe0f 027/427: Flesh out example more.


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 85076dfe0f 027/427: Flesh out example more.
Date: Tue, 13 Dec 2022 02:59:25 -0500 (EST)

branch: elpa/emacsql
commit 85076dfe0f8f4cd8910eea15cc04343073be3fcf
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Flesh out example more.
---
 README.md  | 8 ++++----
 emacsql.el | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 057f940ba9..082143f52d 100644
--- a/README.md
+++ b/README.md
@@ -19,14 +19,14 @@ Requires Emacs 24 or later.
 (defvar db (emacsql-connect "company.db"))
 
 ;; Create a table. A table identifier can be any kind of lisp value.
-(emacsql-create db :employees '(name id salary))
+(emacsql-create db :employees [name id salary])
 
 ;; Or optionally provide column constraints.
-(emacsql-create db :employees '((name text) (id integer) salary))
+(emacsql-create db :employees [(name text) (id integer) (salary real)])
 
 ;; Insert some data:
-(emacsql-insert db :employees ["Jeff"  1000 60000]
-                              ["Susan" 1001 64000])
+(emacsql-insert db :employees ["Jeff"  1000 60000.0]
+                              ["Susan" 1001 64000.0])
 
 ;; The high-level SELECT interface is a work in progress.
 (emacsql-select-raw db (concat "SELECT name, id FROM ':employees' "
diff --git a/emacsql.el b/emacsql.el
index ebefea0f5d..865930eb68 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -21,16 +21,16 @@
 ;; Table identifiers can be any lisp object: string, symbol, etc. I
 ;; suggest using a keyword. Use `emacsql-create' to create a table.
 
-;;     (emacsql-create db :employees '(name id salary))
+;;     (emacsql-create db :employees [name id salary])
 
 ;; Column constraints can optionally be provided.
 
-;;     (emacsql-create db :employees '((name text) (id integer) salary))
+;;     (emacsql-create db :employees [(name text) (id integer) (salary real)])
 
 ;; Insert values into a table with `emacsql-insert'.
 
-;;     (emacsql-insert db :employees ["Jeff"  1000 60000]
-;;                                   ["Susan" 1001 64000])
+;;     (emacsql-insert db :employees ["Jeff"  1000 60000.0]
+;;                                   ["Susan" 1001 64000.0])
 
 ;; Currently all actions are synchronous and Emacs will block until
 ;; SQLite has indicated it is finished processing the last command.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]