LibSQL-1.0

API / Field Types and Flags

Each field (column) in your table can be set to a specific data type:

STRING
Your garden variety string data, fx. "Hello world!".

INTEGER
Signed (64 bit) integer values.

NUMBER
Floating point numbers like 1.25 or 7.39477

BOOLEAN
Boolean values (true or false)

BLOB
A binary string. Unlike the regular STRING fields, this type of string is handled with case-sensitivity.

ENUM
A set of predefined values such as [a,b,c,d]. Only values found in the set are accepted.

DATE
A date in the format of YYYY-MM-DD

TIMESTAMP
A time and date in the format of YYYY-MM-DD HH:MM:SS

TABLE
A pointer to a Lua table.


Furthermore, you can set some field attributes for each field:

  • AUTO_INCREMENT : Increments the value of the field by 1 each time a new row is inserted into the table.
  • DEFAULT (...) : Sets the default value of this field to (...)

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Nov 27, 2010
Last updated
Nov 27, 2010

Author