sqlitex v1.0.0 Sqlitex
Summary
Functions
Create a new table name
where table_opts
are a list of table constraints
and cols
are a keyword list of columns. The following table constraints are
supported: :temp
and :primary_key
. Example
Types
connection :: {:connection, reference, String.t}
sqlite_error :: {:error, {:sqlite_error, char_list}}
string_or_charlist :: String.t | char_list
Functions
Create a new table name
where table_opts
are a list of table constraints
and cols
are a keyword list of columns. The following table constraints are
supported: :temp
and :primary_key
. Example:
[:temp, {:primary_key, [:id]}]
Columns can be passed as:
- name: :type
- name: {:type, constraints}
where constraints is a list of column constraints. The following column constraints
are supported: :primary_key
, :not_null
and :autoincrement
. Example:
id: :integer, name: {:text, [:not_null]}
Specs
open(char_list) ::
{:ok, connection} |
{:error, {atom, char_list}}
open(String.t) :: {:ok, connection}