\Pop\Db\SqlAbstractSql

Abstract SQL class

Summary

Methods
Properties
Constants
__construct()
isMysql()
isPgsql()
isSqlsrv()
isSqlite()
db()
getDb()
setIdQuoteType()
setPlaceholder()
getDbType()
getIdQuoteType()
getPlaceholder()
quoteId()
quote()
No public properties found
MYSQL
PGSQL
SQLITE
SQLSRV
BACKTICK
BRACKET
DOUBLE_QUOTE
NO_QUOTE
No protected methods found
$db
$dbType
$idQuoteType
$placeholder
N/A
No private methods found
No private properties found
N/A

Constants

MYSQL

MYSQL

Constants for database types

PGSQL

PGSQL

SQLITE

SQLITE

SQLSRV

SQLSRV

BACKTICK

BACKTICK

Constants for id quote types

BRACKET

BRACKET

DOUBLE_QUOTE

DOUBLE_QUOTE

NO_QUOTE

NO_QUOTE

Properties

$dbType

$dbType : integer

Database type

Type

integer

$idQuoteType

$idQuoteType : string

ID quote type

Type

string

$placeholder

$placeholder : string

SQL placeholder

Type

string

Methods

isMysql()

isMysql() : boolean

Determine if the DB type is MySQL

Returns

boolean

isPgsql()

isPgsql() : boolean

Determine if the DB type is PostgreSQL

Returns

boolean

isSqlsrv()

isSqlsrv() : boolean

Determine if the DB type is SQL Server

Returns

boolean

isSqlite()

isSqlite() : boolean

Determine if the DB type is SQLite

Returns

boolean

setIdQuoteType()

setIdQuoteType(string  $type = self::NO_QUOTE) : \Pop\Db\Sql\AbstractSql

Set the quote ID type

Parameters

string $type

Returns

\Pop\Db\Sql\AbstractSql

setPlaceholder()

setPlaceholder(string  $placeholder) : \Pop\Db\Sql\AbstractSql

Set the placeholder

Parameters

string $placeholder

Returns

\Pop\Db\Sql\AbstractSql

getDbType()

getDbType() : integer

Get the current database type

Returns

integer

getIdQuoteType()

getIdQuoteType() : integer

Get the quote ID type

Returns

integer

getPlaceholder()

getPlaceholder() : string

Get the SQL placeholder

Returns

string

quoteId()

quoteId(string  $identifier) : string

Quote the identifier

Parameters

string $identifier

Returns

string

quote()

quote(string  $value) : string

Quote the value (if it is not a numeric value)

Parameters

string $value

Returns

string