X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=doc%2Fref-ooddl.xml;h=da340c7662fc4d7e6b7190a7f0aa0b62db01cead;hp=568cb1af80d0eb0c0bcf9cf1431e19b735cc5586;hb=bb71f27c241187a32c7839aea501114d65e29f85;hpb=5248ae9f94d2022596ef8846e0581ea716607a84
diff --git a/doc/ref-ooddl.xml b/doc/ref-ooddl.xml
index 568cb1a..da340c7 100644
--- a/doc/ref-ooddl.xml
+++ b/doc/ref-ooddl.xml
@@ -50,33 +50,49 @@
- *DEFAULT-VARCHAR-LENGTH*
-
+ *DEFAULT-STRING-LENGTH*
+ Default length of SQL strings
Variable
Value Type
-
+ Fixnum
Initial Value
- nil
+ 255
- Description
-
+ Description
+
+ If a slot of a class defined by
+ DEF-VIEW-CLASS is of the type
+ STRING or VARCHAR and does
+ not have a length specified, then the value of this variable
+ is used as SQL length.
+
Examples
-
+ (let ((*default-string-length* 80))
+ (def-view-class s80 ()
+ ((a :type string)
+ (b :type (string 80))
+ (c :type varchar))))
+ (create-view-from-class 's80)
+
+ The above code causes a SQL table to be created with the SQL command
+
+ CREATE TABLE (A VARCHAR(80), B CHAR(80), C VARCHAR(80))
Affected By
- None.
+ Some SQL backends do not support VARCHAR
+ lengths greater than 255 .
See Also
@@ -84,20 +100,20 @@
Notes
- None.
+ This is a CLSQL extension to the CommonSQL API.
CREATE-VIEW-FROM-CLASS
-
+ Create a SQL table from Lisp class
Function
Syntax
- (CREATE-VIEW-FROM-CLASS VIEW-CLASS-NAME &KEY (DATABASE *DEFAULT-DATABASE*)) [function] =>
+ (CREATE-VIEW-FROM-CLASS VIEW-CLASS-NAME &KEY (DATABASE *DEFAULT-DATABASE*) (TRANSACTIONS T)) [function] =>
Arguments and Values
@@ -121,7 +137,7 @@
Side Effects
-
+ Causes a table to be created in the SQL database.