5.1 Types

5.1.0.1 db_handle

include edbi.e
namespace edbi
public type db_handle(object o)

Defines a valid database connection handle.

5.1.0.2 dbr_handle

include edbi.e
namespace edbi
public type dbr_handle(object o)

Defines a valid database result set handle.

5.2 Configuration

5.2.0.1 set_driver_path

include edbi.e
namespace edbi
public procedure set_driver_path(sequence v)

Set an alternate DBI driver path.

5.3 Connectivity

5.3.0.1 open

include edbi.e
namespace edbi
public function open(sequence connection, object routines = 0)

Open a database connection.

5.3.0.2 close

include edbi.e
namespace edbi
public procedure close(db_handle h = 0)

Close a database connection

5.4 Error Information

5.4.0.1 error_code

include edbi.e
namespace edbi
public function error_code(db_handle h = 0)

Get the current error code, if any

5.4.0.2 error_message

include edbi.e
namespace edbi
public function error_message(db_handle h = 0)

Get the current error message (text), if any

5.5 Query Execution/Data Access

5.5.0.1 execute

include edbi.e
namespace edbi
public function execute(sequence sql, sequence data = {},
        db_handle h = 0)

Execute a SQL query that does not expect any record results.

See Also:

total_changes, last_insert_id

5.5.0.2 last_insert_id

include edbi.e
namespace edbi
public function last_insert_id(sequence seq_name = "", db_handle h = 0)

Get the unique id of the last inserted record.

See Also:

execute

5.5.0.3 total_changes

include edbi.e
namespace edbi
public function total_changes(db_handle h = 0)

Get the total number of changes caused by the last execute SQL statement.

See Also:

execute

5.5.0.4 query

include edbi.e
namespace edbi
public function query(sequence sql, sequence data = {}, db_handle h = 0)

Issue a SQL query that expects record data as a result.

See Also:

next

5.5.0.5 next

include edbi.e
namespace edbi
public function next(dbr_handle dbr)

Retrieve the next available row of data.

See Also:

query

5.5.0.6 closeq

include edbi.e
namespace edbi
public procedure closeq(dbr_handle dbr)

Close an active query result.

See Also:

query

5.5.0.7 query_rows

include edbi.e
namespace edbi
public function query_rows(sequence sql, sequence data = {},
        db_handle db = 0)

Query the database for all the rows in the result.

See Also:

query, query_row, query_object

5.5.0.8 query_row

include edbi.e
namespace edbi
public function query_row(sequence sql, sequence data = {},
        db_handle db = 0)

Query the database for just the first row. Querying the database, fetching the first row and closing the query is all handled internally with this routine.

See Also:

query_object, query, next

5.5.0.9 query_object

include edbi.e
namespace edbi
public function query_object(sequence sql, sequence data = {},
        db_handle db = 0)

Query the database for just the first object of the first row. Querying the database, fetching the first object and closing the query is all handled internally with this routine. This routine is helpful for queries such as "SELECT COUNT(*) FROM people".

See Also:

query_row, query, next

About EDBI

EDBI is a common database interface for Euphoria that contains hot-loadable database drivers for a variety of database systems.

Contacts