ClanLib  2.3.7
Classes | List of all members
CL_DBConnection Class Reference

Database connection. More...

#include <db_connection.h>

Inheritance diagram for CL_DBConnection:
Inheritance graph
[legend]

Public Member Functions

Construction
 CL_DBConnection ()
 Constructs a database connection. More...
 
 CL_DBConnection (CL_DBConnectionProvider *provider)
 Constructs a DBConnection. More...
 
 ~CL_DBConnection ()
 
Operations
CL_DBCommand create_command (const CL_StringRef &text, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command. More...
 
template<class Arg1 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 1 input argument. More...
 
template<class Arg1 , class Arg2 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 2 input arguments. More...
 
template<class Arg1 , class Arg2 , class Arg3 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, Arg3 arg3, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 3 input arguments. More...
 
template<class Arg1 , class Arg2 , class Arg3 , class Arg4 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 4 input arguments. More...
 
template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 5 input arguments. More...
 
template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 , class Arg6 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 6 input arguments. More...
 
template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 , class Arg6 , class Arg7 >
CL_DBCommand create_command (const CL_StringRef &format, Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6, Arg7 arg7, CL_DBCommand::Type type=CL_DBCommand::sql_statement)
 Create database command with 7 input arguments. More...
 
CL_DBTransaction begin_transaction (CL_DBTransaction::Type type=CL_DBTransaction::deferred)
 Begin a transaction. More...
 
CL_DBReader execute_reader (CL_DBCommand &command)
 Begin execution of database command. More...
 
CL_String execute_scalar_string (CL_DBCommand &command)
 Execute database command and returns the first column of the first row. More...
 
int execute_scalar_int (CL_DBCommand &command)
 Execute database command and returns the first column of the first row. More...
 
void execute_non_query (CL_DBCommand &command)
 Execute database command. More...
 

Detailed Description

Database connection.

Constructor & Destructor Documentation

CL_DBConnection::CL_DBConnection ( )

Constructs a database connection.

CL_DBConnection::CL_DBConnection ( CL_DBConnectionProvider provider)

Constructs a DBConnection.

Parameters
provider= DBConnection Provider
CL_DBConnection::~CL_DBConnection ( )

Member Function Documentation

CL_DBTransaction CL_DBConnection::begin_transaction ( CL_DBTransaction::Type  type = CL_DBTransaction::deferred)

Begin a transaction.

CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef text,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)

Create database command.

template<class Arg1 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 1 input argument.

template<class Arg1 , class Arg2 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 2 input arguments.

template<class Arg1 , class Arg2 , class Arg3 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
Arg3  arg3,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 3 input arguments.

template<class Arg1 , class Arg2 , class Arg3 , class Arg4 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
Arg3  arg3,
Arg4  arg4,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 4 input arguments.

template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
Arg3  arg3,
Arg4  arg4,
Arg5  arg5,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 5 input arguments.

template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 , class Arg6 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
Arg3  arg3,
Arg4  arg4,
Arg5  arg5,
Arg6  arg6,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 6 input arguments.

template<class Arg1 , class Arg2 , class Arg3 , class Arg4 , class Arg5 , class Arg6 , class Arg7 >
CL_DBCommand CL_DBConnection::create_command ( const CL_StringRef format,
Arg1  arg1,
Arg2  arg2,
Arg3  arg3,
Arg4  arg4,
Arg5  arg5,
Arg6  arg6,
Arg7  arg7,
CL_DBCommand::Type  type = CL_DBCommand::sql_statement 
)
inline

Create database command with 7 input arguments.

void CL_DBConnection::execute_non_query ( CL_DBCommand command)

Execute database command.

CL_DBReader CL_DBConnection::execute_reader ( CL_DBCommand command)

Begin execution of database command.

int CL_DBConnection::execute_scalar_int ( CL_DBCommand command)

Execute database command and returns the first column of the first row.

CL_String CL_DBConnection::execute_scalar_string ( CL_DBCommand command)

Execute database command and returns the first column of the first row.


The documentation for this class was generated from the following file: