text

text

static class DBState

  private static SqliteConnection dbConn;

  private static SqliteCommand dbCommand;

  private static SqliteDataReader dbReader;

//打开数据库

public static bool OpenDb(string path)

//创建库(创建DB文件)

public static bool CreateFile(string path)

//创建表(表名,列名[],类型[])

public static bool CreateTable(string name, string[] columnName, string[] columnTypes)

//插入一行数据(表名,列名[],值[])

public bool InsertDatas(string tableName,string[]columnName, string[] columnValue)

//删除表保留表格式

public bool DelectTable(string tableName)

//根据key更新value(表明,key,value)

public bool UpdateData(string tableName,string updatedataKey,string updatedataValue)

//排序后读取整张表

public static SqliteDataReader ReadFullTable(string tableName, string columnNames)

Sqlite封装类

Sqlite封装类

2019-12-25 12:10:05 0 14
这里是评论

相关推荐