Zen
A cross-platform functional programming language

database Class Reference

Intrinsic database type. More...

#include <zbl.hpp>

List of all members.

Public Member Functions

 database ()
 Default constructor.
 ~database ()
 Destructor.
bool open (const z::string &type, const z::string &name)
 Open the database.
bool create (const z::string &type, const z::string &name, const char *schema[])
 Create the database.
void close ()
 Close the database.
bool begin ()
 Begin a transaction on the database.
bool commit ()
 Commit a transaction.
bool rollback ()
 Rollback a transaction.
QSqlDatabase & get ()
 Returns the stored value.

Private Attributes

QSqlDatabase _val
 The value.

Detailed Description

Intrinsic database type.


Member Function Documentation

bool begin ( ) [inline]

Begin a transaction on the database.

Returns:
True if transaction started, else false
bool commit ( ) [inline]

Commit a transaction.

Returns:
True if commited, else false
bool create ( const z::string type,
const z::string name,
const char *  schema[] 
)

Create the database.

Parameters:
typeThe database type
nameDatabase name
schemaThe database schema
Returns:
True if opened, else false
QSqlDatabase& get ( ) [inline]

Returns the stored value.

Returns:
The value
bool open ( const z::string type,
const z::string name 
)

Open the database.

Parameters:
typeThe database type
nameDatabase name
Returns:
True if opened, else false
bool rollback ( ) [inline]

Rollback a transaction.

Returns:
True if rolled back, else false

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines