C# Class DataEditorX.Core.DataBase

SQLite 操作
Show file Open project: 247321453/DataEditorX

Public Methods

Method Description
CheckTable ( string db ) : bool
Command ( string DB ) : int

执行sql语句

Compression ( string db ) : void
CopyDB ( string DB, bool ignore ) : int

复制数据库

Create ( string Db ) : bool

创建数据库

DeleteDB ( string DB ) : int
GetDeleteSQL ( Card c ) : string

转换删除语句

GetInsertSQL ( Card c, bool ignore, bool hex = false ) : string

转换为插入语句

GetSelectSQL ( Card c ) : string
GetUpdateSQL ( Card c ) : string

转换为更新语句

Read ( string DB, bool reNewLine ) : Card[]
exportSql ( String file ) : void
findPack ( string db, long id ) : CardPack

Private Methods

Method Description
DataBase ( ) : System
ReadCard ( SQLiteDataReader reader, bool reNewLine ) : Card
Retext ( string text ) : string
toInt ( long l ) : string

Method Details

CheckTable() public static method

public static CheckTable ( string db ) : bool
db string
return bool

Command() public static method

执行sql语句
public static Command ( string DB ) : int
DB string 数据库
return int

Compression() public static method

public static Compression ( string db ) : void
db string
return void

CopyDB() public static method

复制数据库
public static CopyDB ( string DB, bool ignore ) : int
DB string 复制到的数据库
ignore bool 是否忽略存在
return int

Create() public static method

创建数据库
public static Create ( string Db ) : bool
Db string 新数据库路径
return bool

DeleteDB() public static method

public static DeleteDB ( string DB ) : int
DB string
return int

GetDeleteSQL() public static method

转换删除语句
public static GetDeleteSQL ( Card c ) : string
c Card 卡片密码
return string

GetInsertSQL() public static method

转换为插入语句
public static GetInsertSQL ( Card c, bool ignore, bool hex = false ) : string
c Card 卡片数据
ignore bool
hex bool
return string

GetSelectSQL() public static method

public static GetSelectSQL ( Card c ) : string
c Card
return string

GetUpdateSQL() public static method

转换为更新语句
public static GetUpdateSQL ( Card c ) : string
c Card 卡片数据
return string

Read() public static method

public static Read ( string DB, bool reNewLine ) : Card[]
DB string
reNewLine bool
return Card[]

exportSql() public static method

public static exportSql ( String file ) : void
file String
return void

findPack() public static method

public static findPack ( string db, long id ) : CardPack
db string
id long
return CardPack