Skip to content

Latest commit

 

History

History
171 lines (99 loc) · 3.74 KB

texas.md

File metadata and controls

171 lines (99 loc) · 3.74 KB

Module texas

Data Types


connection() = #texas{}

connection_string() = string()

data() = any()

table() = atom()

Function Index

close/1 Close the connection to the database.
connect/0 Connect to the database.
connect/1
connect/2
create_table/2 Create the given table (if not exists).
create_table/3 Create the given table (if not exists).
driver/1
drop_table/2 Drop the given table (if exists).
start/0
to_keylist/2 Return the record as keylist.

Function Details

close/1


close(Conn::connection()) -> any()

Close the connection to the database

connect/0


connect() -> connection() | {error, any()}

Connect to the database.

connect/1


connect(URI::connection_string()) -> connection() | {error, any()}

connect/2


connect(URI::connection_string(), Options::[tuple()]) -> connection() | {error, any()}

create_table/2


create_table(Conn::connection(), Table::table()) -> any()

Create the given table (if not exists)

create_table/3


create_table(Conn::connection(), Table::table(), Fields::list()) -> any()

Create the given table (if not exists)

driver/1


driver(Conn::connection() | data()) -> atom()

drop_table/2


drop_table(Conn::connection(), Table::table()) -> ok | error

Drop the given table (if exists)

start/0


start() -> ok | {ok, connection()} | {error, any()}

to_keylist/2


to_keylist(Table::atom(), Record::data()) -> list()

Return the record as keylist