Vocabularydb.
tuplesInputsclass | a class |
table | a string |
columns | an array of slot specifiers |
OutputsNone
Word descriptionDefines a relation from a Factor
tuple class to an SQL database table name. The format for the slot specifiers is as follows:
• | a slot name from the tuple class |
• | the name of a database column that maps to the slot |
• | a database type (see Database types) |
Throws an error if the slot name (column one from each row) is not a slot in the tuple or its superclases.
ExamplesUSING: db.tuples db.types ;
TUPLE: boat id year name ;
boat "BOAT" {
{ "id" "ID" +db-assigned-id+ }
{ "year" "YEAR" INTEGER }
{ "name" "NAME" TEXT }
} define-persistent
Definition