|
| MysqlConnection (winux::String const &host, winux::String const &user, winux::String const &pwd, winux::String const &dbName, winux::String const &linkCharset, bool doConnect=true) |
|
virtual | ~MysqlConnection () |
|
virtual bool | connect () override |
| 连接数据库 更多...
|
|
virtual bool | close () override |
| 关闭连接 更多...
|
|
virtual void | alive () override |
| 确保该连接有效(还活着) 更多...
|
|
virtual bool | setLinkCharset (winux::String const &charset) override |
| 设置连接校验字符集 更多...
|
|
virtual bool | selectDb (winux::String const &database) override |
| 选定要操作的数据库 更多...
|
|
virtual bool | createDb (winux::String const &database) override |
| 创建一个库 更多...
|
|
virtual bool | dropDb (winux::String const &database) override |
| 删除数据库 更多...
|
|
virtual size_t | affectedRows () override |
| 受影响的行数 更多...
|
|
virtual size_t | insertId () override |
| 获得最后一次完成记录插入时的ID值 更多...
|
|
virtual int | errNo () override |
| 获得错误号 更多...
|
|
virtual winux::String | error () override |
| 获得错误信息 更多...
|
|
virtual winux::String | escape (winux::String const &str, winux::String const &addQuote="\'") override |
| 普通文本转成SQL语句安全的文本,用做SQL语句的字符串 更多...
|
|
virtual winux::String | escape (void const *buf, size_t size, winux::String const &addQuote="\'") override |
| 二进制数据转成SQL语句安全的文本,用做SQL语句的字符串 更多...
|
|
virtual bool | exec (winux::String const &sql) override |
| 不需要数据的查询 更多...
|
|
virtual bool | exec (winux::SharedPointer< IDbStatement > stmt) override |
|
virtual winux::SharedPointer< IDbResult > | query (winux::String const &sql) override |
| 查询数据结果 更多...
|
|
virtual winux::SharedPointer< IDbResult > | query (winux::SharedPointer< IDbStatement > stmt) override |
|
virtual winux::SharedPointer< IDbResult > | listDbs () override |
| 获得所有数据库的一个结果集 更多...
|
|
virtual winux::SharedPointer< IDbResult > | listFields (winux::String const &tableName) override |
| 获得数据库里某表所有字段的一个结果集 更多...
|
|
virtual winux::SharedPointer< IDbResult > | listTables () override |
| 获得数据库里所有表的一个结果集 更多...
|
|
virtual winux::String | tableDdl (winux::String const &tableName) override |
| 取得一张表的DDL 更多...
|
|
virtual winux::String | symbolQuotes (winux::String const &str) override |
| 加入标识符的引用标记,如表名,字段名等等 更多...
|
|
virtual size_t | loadSql (winux::String const &sqlText, winux::StringArray *arrSql) override |
| 加载SQL到一个字符串数组,返回语句条数 更多...
|
|
virtual size_t | loadSqlFile (winux::IFile *sqlScriptFile, winux::StringArray *arrSql) override |
| 加载SQL文件到一个字符串数组,返回语句条数 更多...
|
|
virtual size_t | getPrimaryKey (winux::String const &tableName, winux::StringArray *arrKeyColumn) override |
| 取得表的主键,返回主键字段数 更多...
|
|
virtual winux::SharedPointer< IDbStatement > | buildStmt (winux::String const &sql) override |
| 构造一个语句对象 更多...
|
|
virtual winux::SharedPointer< IDbStatement > | buildStmt (winux::String const &sql, winux::Mixed const ¶ms) override |
| 构造一个语句对象 更多...
|
|
virtual winux::SharedPointer< IDbStatement > | buildStmt (winux::String const &sql, winux::MixedArray const ¶ms) override |
| 构造一个语句对象 更多...
|
|
virtual winux::SharedPointer< IDbStatement > | buildStmt (winux::String const &sql, winux::StringMixedMap const ¶ms) override |
| 构造一个语句对象 更多...
|
|
virtual | operator bool () const override |
| 判断一个连接是否有效 更多...
|
|
| operator struct st_mysql * () const |
|
virtual | ~IDbConnection () |
|