CaMykS  1.0-20231201
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SQLite3DBConnection Class Reference

SQLite3 Database connection object. More...

Inheritance diagram for SQLite3DBConnection:
CDBConnection

Public Member Functions

 __construct ()
 
 connect_server ($host='localhost', $login='', $pwd='', $driver='')
 
 disconnect_server ()
 
 get_serverVersion ()
 
 select_database ($name)
 
 create_database ($name, $charset='utf8')
 
 database_exists ($name)
 
 dump_database ($file=false)
 
 get_databaseSize ()
 
 get_databaseSummary ()
 
 get_tableList ()
 
 create_table ($name, $fields, $charset='utf8', $autoId=true, $primaryKeys=array('id'))
 
 execute_query ($sql='', $resName='defaultRes')
 
 execute_multiQueries ($sql='', $resName='defaultRes')
 
 get_queryGeneratedId ($resName='defaultRes')
 
 get_queryDataLine ($resName='defaultRes')
 
 get_queryNumDataLine ($resName='defaultRes')
 
 get_queryError ($resName='defaultRes')
 
 get_queryAffectedRows ($resName='defaultRes')
 
 get_queryFieldCount ($resName='defaultRes')
 
 get_queryFieldType ($fIndex=0, $resName='defaultRes')
 
 close_ressource ($resName='defaultRes')
 
 escape_string ($string)
 
- Public Member Functions inherited from CDBConnection
 is_connectionActive ()
 
 check_status ($name)
 
 get_insertExtra ()
 

Private Member Functions

 get_compatibleType ($type=1)
 
 get_fullDatabaseName ($dbName)
 

Private Attributes

 $dbPath
 Database file path. More...
 
 $dbExtension = '.sqlite3.inc'
 Database file extension. More...
 
 $dbEncryptionKey
 Database encryption key. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDBConnection
 get_resName ()
 
- Protected Attributes inherited from CDBConnection
 $active = false
 CDBConnection status. More...
 
 $connection = null
 CDBConnection database ressource. More...
 
 $queryRes = array()
 Query ressources. More...
 
 $dbName = null
 Name of the database. More...
 

Detailed Description

SQLite3 Database connection object.

Engine / Object Library

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Version
1.0.1
Date
Creation: Nov 2017
Modification: Sep 2020
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Todo:
Complete dump_database() and get_databaseSummary() methods.

SQLite3DBConnection class.

Constructor & Destructor Documentation

◆ __construct()

SQLite3DBConnection::__construct ( )

Class constructor.

Returns
void

Reimplemented from CDBConnection.

Member Function Documentation

◆ connect_server()

SQLite3DBConnection::connect_server (   $host = 'localhost',
  $login = '',
  $pwd = '',
  $driver = '' 
)

Connect to server.

Parameters
string$host
string$login
string$pwd
string$driver
Returns
boolean success

Reimplemented from CDBConnection.

◆ disconnect_server()

SQLite3DBConnection::disconnect_server ( )

Close server connection.

Returns
boolean success

Reimplemented from CDBConnection.

◆ get_serverVersion()

SQLite3DBConnection::get_serverVersion ( )

Return database engine version.

Returns
string

Reimplemented from CDBConnection.

◆ select_database()

SQLite3DBConnection::select_database (   $name)

Select database.

Parameters
string$namethe database name
Returns
boolean

Reimplemented from CDBConnection.

◆ create_database()

SQLite3DBConnection::create_database (   $name,
  $charset = 'utf8' 
)

Create a database.

Parameters
string$name
string$charset
Returns
boolean

Reimplemented from CDBConnection.

◆ database_exists()

SQLite3DBConnection::database_exists (   $name)

Check if a base exists.

Parameters
string$name
Returns
boolean

Reimplemented from CDBConnection.

◆ dump_database()

SQLite3DBConnection::dump_database (   $file = false)

Dump database.

Parameters
mixed$file
Returns
mixed

Reimplemented from CDBConnection.

◆ get_databaseSize()

SQLite3DBConnection::get_databaseSize ( )

Return database size.

Returns
integer

Reimplemented from CDBConnection.

◆ get_databaseSummary()

SQLite3DBConnection::get_databaseSummary ( )

Return database summary.

Returns
array
Todo:
Complete method.

Reimplemented from CDBConnection.

◆ get_tableList()

SQLite3DBConnection::get_tableList ( )

Return available table list.

Returns
array

Reimplemented from CDBConnection.

◆ create_table()

SQLite3DBConnection::create_table (   $name,
  $fields,
  $charset = 'utf8',
  $autoId = true,
  $primaryKeys = array('id') 
)

Create a table in the database.

Parameters
string$name
array$fields
string$charset
boolean$autoId
array$primaryKeys
Returns
boolean success

Reimplemented from CDBConnection.

◆ execute_query()

SQLite3DBConnection::execute_query (   $sql = '',
  $resName = 'defaultRes' 
)

Eexecute query.

Parameters
string$sql
string$resName
Returns
boolean success

Reimplemented from CDBConnection.

◆ execute_multiQueries()

SQLite3DBConnection::execute_multiQueries (   $sql = '',
  $resName = 'defaultRes' 
)

Execute multiple queries at once.

Parameters
string$sql
string$resName
Returns
boolean success

Reimplemented from CDBConnection.

◆ get_queryGeneratedId()

SQLite3DBConnection::get_queryGeneratedId (   $resName = 'defaultRes')

Return id generated by last query.

Parameters
string$resName
Returns
integer

Reimplemented from CDBConnection.

◆ get_queryDataLine()

SQLite3DBConnection::get_queryDataLine (   $resName = 'defaultRes')

Return next query data line.

Parameters
string$resName
Returns
array

Reimplemented from CDBConnection.

◆ get_queryNumDataLine()

SQLite3DBConnection::get_queryNumDataLine (   $resName = 'defaultRes')

Return next query data line with numeric indexes.

Parameters
string$resName
Returns
array

Reimplemented from CDBConnection.

◆ get_queryError()

SQLite3DBConnection::get_queryError (   $resName = 'defaultRes')

Return latest query error.

Parameters
string$resName
Returns
string

Reimplemented from CDBConnection.

◆ get_queryAffectedRows()

SQLite3DBConnection::get_queryAffectedRows (   $resName = 'defaultRes')

Return latest query affected rows.

Parameters
string$resName
Returns
integer

Reimplemented from CDBConnection.

◆ get_queryFieldCount()

SQLite3DBConnection::get_queryFieldCount (   $resName = 'defaultRes')

Return latest query field count.

Parameters
string$resName
Returns
integer

Reimplemented from CDBConnection.

◆ get_queryFieldType()

SQLite3DBConnection::get_queryFieldType (   $fIndex = 0,
  $resName = 'defaultRes' 
)

Return latest query field type.

Parameters
integer$fIndex
string$resName
Returns
string

Reimplemented from CDBConnection.

◆ close_ressource()

SQLite3DBConnection::close_ressource (   $resName = 'defaultRes')

Close ressource.

Parameters
string$resName
Returns
boolean result

Reimplemented from CDBConnection.

◆ escape_string()

SQLite3DBConnection::escape_string (   $string)

Return escaped string.

Parameters
string$string
Returns
string

Reimplemented from CDBConnection.

◆ get_compatibleType()

SQLite3DBConnection::get_compatibleType (   $type = 1)
private

Return sqlite3 compatible type from given type.

Parameters
integer$type
Returns
string

◆ get_fullDatabaseName()

SQLite3DBConnection::get_fullDatabaseName (   $dbName)
private

Return full database path.

Parameters
string$dbName
Returns
string

Member Data Documentation

◆ $dbPath

string SQLite3DBConnection::$dbPath
private

Database file path.

◆ $dbExtension

string SQLite3DBConnection::$dbExtension = '.sqlite3.inc'
private

Database file extension.

◆ $dbEncryptionKey

string SQLite3DBConnection::$dbEncryptionKey
private

Database encryption key.


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