CREATE-VIEW-FROM-CLASS — Create a SQL table from a View Class.Function
view-class-name
The name of a View
Class that has been defined with def-view-class
.
database
The database in which to create the SQL table. This will default to the value of *default-database*.
transactions
When NIL
specifies that a table type which does not
support transactions should be used.
(def-view-class foo () ((a :type (string 80)))) => #<Standard-Db-Class FOO {4807F7CD}> (create-view-from-class 'foo) => (list-tables) => ("FOO")
Most SQL database systems will signal an error if a table creation is attempted when a table with the same name already exists. The SQL user, as specified in the database connection, must have sufficient permission for table creation.
A condition will be signaled if the table can not be created in the SQL database.
Currently, only MySQL supports transactionless tables. CLSQL provides the ability to create such tables for applications which would benefit from faster table access and do not require transaction support.
The case of the table name is determined by the type of the database. MySQL, for example, creates databases in upper-case while PostgreSQL uses lowercase.