LibSQL-1.0

API

  • 3 pages found
NameAuthorLast updated byUpdated on
NameAuthorLast updated byUpdated on
Field Types and Flags Humbedooh Humbedooh Nov 27, 2010
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...
LibSQL-1.0 Humbedooh Humbedooh Nov 28, 2010
LibSQL:Acquire(name, data, args) Acquires an already existing Lua table and uses it as an internal table. This allows for SQL manipulation of regular Lua tables without having to create a permanent LibSQL database. Parameters name [string] The name of the table you wish to acquire. data [table] The Lua table to acquire args [table] Directions on how your table is set up. The blueprint consists of a table with each element using the following parameters: field = "TYPE [FLAGS] [AS field_name]...
Primer Humbedooh Humbedooh Nov 24, 2010
Creating your database The first thing you'll need is a database object. Creating one is very simple: local database = LibSQL:New() You'll most likely want to save your database for later use, and if so, you can always reopen your database. The following code shows how to reopen an old database or create a new if none exists: local database = mySavedVariables.database -- get our random database object if database then -- If we already have a saved database object LibSQL:Open(database) -- just...
  • 3 pages found