X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fref-fddl.xml;h=755f6cea5c0a3871f7626746f0f5aee4ec850019;hb=e877b742b7e9a3d0ce6d4080bb78aada354ffa88;hp=5d542ded1ffdf0b8b92969d71c67d9a63bc108c5;hpb=fdd069770e32d0cfa4b66d6e5cfd4540197660ba;p=clsql.git diff --git a/doc/ref-fddl.xml b/doc/ref-fddl.xml index 5d542de..755f6ce 100644 --- a/doc/ref-fddl.xml +++ b/doc/ref-fddl.xml @@ -109,6 +109,18 @@ => (table-exists-p [foo]) => T + +(create-table [foo] '(([bar] integer :not-null :unique :primary-key) + ([baz] string :not-null :unique))) +=> +(table-exists-p [foo]) +=> T + +(create-table [foo] '(([bar] integer :not-null) ([baz] string :not-null)) + :constraints '("UNIQUE (bar,baz)" "PRIMARY KEY (bar)")) +=> +(table-exists-p [foo]) +=> T @@ -2506,4 +2518,101 @@ + + + TRUNCATE-DATABASE + + + Function TRUNCATE-DATABASE + Drop all tables, views, indexes and sequences in a database. + Function + + + Syntax + + truncate-database &key database => + + + Arguments and Values + + + database + + A + database + object. This will default to the value + of *default-database*. + + + + + + Description + + Drop all tables, views, indexes and sequences in + database which defaults to + *default-database*. + + + + Examples + +(list-tables) +=> ("type_table" "type_bigint" "employee" "company" "addr" "ea_join" "big") +(list-indexes) +=> ("employeepk" "companypk" "addrpk") +(list-views) +=> ("lenins_group") +(list-sequences) +=> ("foo" "bar") +(truncate-database) +=> +(list-tables) +=> NIL +(list-indexes) +=> NIL +(list-views) +=> NIL +(list-sequences) +=> NIL + + + + Side Effects + + Modifications are made to the underlying database. + + + + Affected by + + None. + + + + Exceptional Situations + + Signals an error of type sql-database-error if + database is not a database object. + + + + See Also + + + drop-table + drop-view + drop-index + drop-sequence + + + + + Notes + + truncate-database is a &clsql; extension. + + + +