Sqlite的ORM模型
属性 |
值 |
命名空间 |
fize\db\realization\sqlite |
类名 |
Mode |
实现接口 |
fize\db\definition\Mode |
odbc方式构造
public static function odbc (
string $filename,
int $long_names = 0,
int $time_out = 1000,
int $no_txn = 0,
string $sync_pragma = "NORMAL",
int $step_api = 0,
string $driver = null
) : \fize\db\realization\sqlite\mode\Odbc
参数: |
名称
|
说明
|
filename
|
数据库文件路径
|
long_names
|
参数LongNames
|
time_out
|
参数Timeout
|
no_txn
|
参数NoTXN
|
sync_pragma
|
参数SyncPragma
|
step_api
|
参数StepAPI
|
driver
|
指定ODBC驱动
|
|
pdo方式构造
public static function pdo (
string $filename
) : \fize\db\realization\sqlite\mode\Pdo
sqlite3构造
public static function sqlite3 (
string $filename,
int $flags = 2,
string $encryption_key = null,
int $busy_timeout = 30000
) : \fize\db\realization\sqlite\mode\Sqlite3
参数: |
名称
|
说明
|
filename
|
数据库文件路径
|
flags
|
模式,默认是SQLITE3_OPEN_READWRITE
|
encryption_key
|
加密密钥
|
busy_timeout
|
超时时间
|
|
数据库实例
public static function getInstance (
string $mode,
array $config
) : \fize\db\realization\sqlite\Db
参数: |
名称
|
说明
|
mode
|
连接模式
|
config
|
数据库参数选项
|
|