Name

*DEFAULT-STRING-LENGTH* — Default length of SQL strings.Variable

Value Type

Fixnum

Initial Value

255

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))))
=> #<Standard-Db-Class S80 {480A431D}>

(create-view-from-class 's80)
=>
(table-exists-p [s80])
=> T
      

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

Some SQL backends do not support varchar lengths greater than 255.

See Also

None.

Notes

This is a CLSQL extension to the CommonSQL API.