\addons\database\libDatabase

Summary

Methods
Properties
Constants
__construct()
create()
backup()
import()
__destruct()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
open()
write()
$fp
$file
$size
$config
N/A

Properties

$fp

$fp : resource

文件指针

Type

resource

$file

$file : array

备份文件信息 part - 卷号,name - 文件名

Type

array

$size

$size : int

当前打开文件大小

Type

int

$config

$config : int

备份配置

Type

int

Methods

__construct()

__construct(array  $file, array  $config, string  $type = 'export') : mixed

数据库备份构造方法

Parameters

array $file

备份或还原的文件信息

array $config

备份配置信息

string $type

执行类型,export - 备份数据, import - 还原数据

Returns

mixed —

create()

create() : bool

写入初始数据

Returns

bool —

true - 写入成功,false - 写入失败

backup()

backup(string  $table, int  $start) : bool

备份表结构

Parameters

string $table

表名

int $start

起始行数

Returns

bool —

false - 备份失败

import()

import(mixed  $start) : mixed

Parameters

mixed $start

Returns

mixed —

__destruct()

__destruct() : mixed

析构方法,用于关闭文件资源

Returns

mixed —

open()

open(int  $size) : mixed

打开一个卷,用于写入数据

Parameters

int $size

写入数据的大小

Returns

mixed —

write()

write(string  $sql) : bool

写入SQL语句

Parameters

string $sql

要写入的SQL语句

Returns

bool —

true - 写入成功,false - 写入失败!