\SQLiteTable

Summary

Methods
Properties
Constants
__construct()
compareStruct()
build()
rebuild()
buildSQL()
buildStruct()
No public properties found
No constants found
No protected methods found
$db
$sql
$struct
$name
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : 

Type

$sql

$sql : 

Type

$struct

$struct : 

Type

$name

$name : 

Type

Methods

__construct()

__construct(  $db, string  $name, string|array  $sql = '') 

构造函数

Parameters

$db
string $name

表名

string|array $sql

建表SQL或结构

compareStruct()

compareStruct(array  $struct) : boolean

比较结构

Parameters

array $struct

表结构

Returns

boolean —

表结构是否一致

build()

build() 

新建表

rebuild()

rebuild(array  $newStruct) 

重建表

Parameters

array $newStruct

新表结构

buildSQL()

buildSQL(string  $tableName, array  $struct, boolean  $temporary = false) : string

构造建表SQL

Parameters

string $tableName

表名

array $struct

表结构

boolean $temporary

是否是临时表

Returns

string —

建表SQL

buildStruct()

buildStruct(string  $sql) : array

构造表结构

Parameters

string $sql

SQL语句

Returns

array —

表结构