higrid.net


other_package\hiGridDB
hgGridPdo.php at line 3

Class hiGridDB

hiGridDB

public class hiGridDB


Method Summary
static void

getInterface()

static void

prepare(mixed connhigrid, mixed sqlElement, mixed params, bool bind)

static void

limit(mixed sqlId, mixed dbtype, int nrows, int offset, str order, str sort)

static void

execute(mixed psql, mixed prm)

static void

query(mixed connhigrid, mixed sql)

static boolean

bindValues(resurce stmt, array binds, array types)

Bind the values for CRUD using the PDO bindValue.

static void

beginTransaction(mixed connhigrid)

static void

commit(mixed connhigrid)

static void

rollBack(mixed connhigrid)

static number

lastInsertId(mixed connhigrid, mixed table, mixed IdCol, mixed dbtype)

Return the last inserted id in a table in case when the serialKey is set to true

static void

fetch_object(mixed psql, mixed fetchall, mixed connhigrid)

static void

fetch_num(mixed psql)

static void

fetch_assoc(mixed psql, mixed connhigrid)

static void

closeCursor(mixed sql)

static void

columnCount(mixed rs)

static void

getColumnMeta(mixed index, mixed sql)

static string

MetaType(array t, string dbtype)

Return the meta type of the field based on the underlayng db

protected static string

MetaPgsql(string native_type, integer max_length, int max_len)

The meta types for PostgreSQL database

protected static string

MetaMysql(string native_type, integer max_length)

The meta types for MySQL database

protected static string

MetaSqlite(string native_type, integer max_length)

The meta types for SQLite database

protected static string

MetaSqlsrv(string native_type, integer max_length)

The meta types for SQLite database

static mixed

getPrimaryKey(mixed table, mixed connhigrid, mixed dbtype)

Try to get the primary key of the table automattically

static void

errorMessage(mixed connhigrid)

Discover primary key column(s) for this table.

Method Detail

hgGridPdo.php at line 5

getInterface

public static void getInterface()

hgGridPdo.php at line 9

prepare

public static void prepare(mixed connhigrid, mixed sqlElement, mixed params, bool bind)

hgGridPdo.php at line 40

limit

public static void limit(mixed sqlId, mixed dbtype, int nrows, int offset, str order, str sort)

hgGridPdo.php at line 89

execute

public static void execute(mixed psql, mixed prm)

hgGridPdo.php at line 97

query

public static void query(mixed connhigrid, mixed sql)

hgGridPdo.php at line 115

bindValues

public static boolean bindValues(resurce stmt, array binds, array types)

Bind the values for CRUD using the PDO bindValue. In case of table we use the type to bind the values accordantly. In case of custom SQL we use the default PDO::PARAM

Parameters:
stmt - the prapared statement
binds - array containing the value for binding
types - array containing the type of the field
Returns:
true on success

hgGridPdo.php at line 147

beginTransaction

public static void beginTransaction(mixed connhigrid)

hgGridPdo.php at line 151

commit

public static void commit(mixed connhigrid)

hgGridPdo.php at line 155

rollBack

public static void rollBack(mixed connhigrid)

hgGridPdo.php at line 164

lastInsertId

public static number lastInsertId(mixed connhigrid, mixed table, mixed IdCol, mixed dbtype)

Return the last inserted id in a table in case when the serialKey is set to true


hgGridPdo.php at line 172

fetch_object

public static void fetch_object(mixed psql, mixed fetchall, mixed connhigrid)

hgGridPdo.php at line 188

fetch_num

public static void fetch_num(mixed psql)

hgGridPdo.php at line 196

fetch_assoc

public static void fetch_assoc(mixed psql, mixed connhigrid)

hgGridPdo.php at line 208

closeCursor

public static void closeCursor(mixed sql)

hgGridPdo.php at line 212

columnCount

public static void columnCount(mixed rs)

hgGridPdo.php at line 219

getColumnMeta

public static void getColumnMeta(mixed index, mixed sql)

hgGridPdo.php at line 233

MetaType

public static string MetaType(array t, string dbtype)

Return the meta type of the field based on the underlayng db

Parameters:
t - object returned from pdo getColumnMeta
dbtype - the database type
Returns:
the type of the field can be string, date, datetime, blob, int, numeric

hgGridPdo.php at line 271

MetaPgsql

protected static string MetaPgsql(string native_type, integer max_length, int max_len)

The meta types for PostgreSQL database


hgGridPdo.php at line 333

MetaMysql

protected static string MetaMysql(string native_type, integer max_length)

The meta types for MySQL database


hgGridPdo.php at line 386

MetaSqlite

protected static string MetaSqlite(string native_type, integer max_length)

The meta types for SQLite database


hgGridPdo.php at line 431

MetaSqlsrv

protected static string MetaSqlsrv(string native_type, integer max_length)

The meta types for SQLite database


hgGridPdo.php at line 484

getPrimaryKey

public static mixed getPrimaryKey(mixed table, mixed connhigrid, mixed dbtype)

Try to get the primary key of the table automattically

Returns:
the value of the key or false if not presend or not found

hgGridPdo.php at line 591

errorMessage

public static void errorMessage(mixed connhigrid)

Discover primary key column(s) for this table.


higrid.net