This class provides translation of high level query objects into plain SQL for MySQL/MariaDb database.
You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.
class CDbQueryBuilderMySql :public virtual IDbQueryBuilder, public CReleasable
{
public:
static const String Name;
// IDbQueryBuilder database manipulation queries
bool CreateDatabase(const String& name, const String& charset, const String& collation, const bool if_not_exists, String& target) override;
bool AlterDatabase(const String& name, const String& charset, const String& collation, String& target) override;
bool DropDatabase(const String& name, const bool if_exists, String& target) override;
// IDbQueryBuilder table manipulation queries
bool CreateTable(
const String& name,
const IDbMigration::MigrationColumns& columns,
const IDbMigration::MigrationKeys& keys,
const bool& if_not_exists,
const String& comment,
const int64& auto_increment,
const String& charset,
const String& collation,
const String& engine,
String& target) override;
bool AlterTable(const String& name, const String& charset, const String& collation, const bool& convert, String& target) override;
bool RenameTable(const String& old_name, const String& new_name, String& target) override;
bool TruncateTable(const String& name, String& target) override;
bool DropTable(const String& name, const bool if_exists, String& target) override;
bool DisableKeys(const String& table, String& target) override;
bool EnableKeys(const String& table, String& target) override;
// IDbQueryBuilder column manipulation options
bool AddColumn(const String& table, const IDbMigrationColumn* column, const String& after, String& target) override;
bool AlterColumn(const String& table, const IDbMigrationColumn* column, const String& after, String& target) override;
bool AlterColumn(const String& table, const String& old_name, const IDbMigrationColumn* column, const String& after, String& target) override;
bool RenameColumn(const String& table, const String& old_name, const String& new_name, String& target) override;
bool DropColumn(const String& table, const String& name, String& target) override;
// IDbQueryBuilder key manipulation queries
bool AddKey(const String& table, const IDbMigrationKey* key, String& target) override;
bool RenameKey(const String& table, const String& old_name, const String& new_name, String& target) override;
bool DropKey(const String& table, const String& name, String& target) override;
bool DropPrimaryKey(const String& table, const String& name, String& target) override;
// IDbQueryBuilder select queries
bool Select(const IDbQuery* query, String& target) override;
bool Exists(const IDbQuery* query, String& target) override;
bool Scalar(const IDbQuery* query, const String& column, String& target) override;
bool Count(const IDbQuery* query, const String& column, String& target) override;
bool Sum(const IDbQuery* query, const String& column, String& target) override;
bool Average(const IDbQuery* query, const String& column, String& target) override;
bool Min(const IDbQuery* query, const String& column, String& target) override;
bool Max(const IDbQuery* query, const String& column, String& target) override;
// IDbQueryBuilder delete queries
bool Delete(const IDbQuery* query, String& target) override;
// IDbQueryBuilder insert queries
bool Insert(const IDbQuery* query, const StringArray& columns, const DbRow& row, const String& on_duplicate_update, String& target) override;
bool Insert(const IDbQuery* query, const StringArray& columns, const DbRows& rows, const String& on_duplicate_update, String& target) override;
bool Insert(const IDbQuery* query, const DbSet &data, const String& on_duplicate_update, String& target) override;
// IDbQueryBuilder update queries
bool Update(const IDbQuery* query, const StringArray& columns, const DbRow& row, String& target) override;
bool Update(const IDbQuery* query, const DbSet &data, String& target) override;
// IDbQueryBuilder transaction queries
bool StartTransaction(const String& options, String& target) override;
bool Commit(String& target) override;
bool RollBack(String& target) override;
// IDbQueryBuilder information queries
bool LastInsertId(String& target) override;
bool AutoIncrementColumn(const String& table, String& target) override;
};
Namespace: | nitisa |
Include: | Nitisa/Db/DbQueryBuilderMySql.h |