X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=examples%2Fsqlite3%2Finit-func%2Fexample.lisp;h=82fa9d34910a5e5d50678b61446df7b04bff90c9;hb=0ad64f85ff6cd99a78cc9ae6716ebbdb5627eaef;hp=1a81645c34aa4e8830d0361fb241311a121c4dd4;hpb=d529146041f6265030edc25c735e063ebfdbd285;p=clsql.git diff --git a/examples/sqlite3/init-func/example.lisp b/examples/sqlite3/init-func/example.lisp index 1a81645..82fa9d3 100644 --- a/examples/sqlite3/init-func/example.lisp +++ b/examples/sqlite3/init-func/example.lisp @@ -7,8 +7,6 @@ ;;;; Authors: Aurelio Bignoli ;;;; Created: Oct 2004 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Aurelio Bignoli ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -21,12 +19,12 @@ ;;;; Load sqlite3-utils.so library. See Makefile for library creation. (unless (uffi:load-foreign-library "/usr/lib/clsql/sqlite3-utils.so" - :module "sqlite3-utils" - :supporting-libraries '("c")) + :module "sqlite3-utils" + :supporting-libraries '("c")) (error "Unable to load foreign library")) ;;;; Define the foreign function to be used as init function. -(uffi:def-function +(uffi:def-function ("create_iso_8859_15_ci_collation" create-coll) ((db sqlite3:sqlite3-db)) :returning :int @@ -39,7 +37,7 @@ ;;;; Create a table. Field f2 uses the newly defined collating ;;;; sequence. -(clsql:execute-command +(clsql:execute-command "CREATE TABLE t1 (f1 CHAR(1), f2 CHAR(1) COLLATE ISO_8859_15_CI)") ;;;; Populate the table. @@ -61,10 +59,10 @@ ;;;; Perform some SELECTs. (format t "~&SELECT * FROM t1 ==> ~A~%"(clsql:query "SELECT * FROM t1")) -(format t "~&SELECT * FROM t1 ORDER BY f1 ==> ~A~%" - (clsql:query "SELECT * FROM t1 ORDER BY f1")) -(format t "~&SELECT * FROM t1 ORDER BY f2 ==> ~A~%" - (clsql:query "SELECT * FROM t1 ORDER BY f2")) +(format t "~&SELECT * FROM t1 ORDER BY f1 ==> ~A~%" + (clsql:query "SELECT * FROM t1 ORDER BY f1")) +(format t "~&SELECT * FROM t1 ORDER BY f2 ==> ~A~%" + (clsql:query "SELECT * FROM t1 ORDER BY f2")) ;;;; Disconnect from database. -(clsql:disconnect) \ No newline at end of file +(clsql:disconnect)