mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-03 01:20:23 -06:00
added schema builder 🔥🚀✨
Added practically everything I wanted to have in except for updating columns. Needed to name the schema namespace as Orm::SchemaNs to avoid collision with the Orm::Schema class. - unit tests with great coverage - new schema constants - a new prefix_indexes and engine DB conncetion configurations Others: - IsModel tag - enhanced columnize in the BaseGrammar - used a new columnize logic in all grammars - new constants - new container utils class for joining containers - new DB::driver() getter for QSqlDriver - avoid possible crash in tests with pretend, added empty log checks - clang tidy, excluded to word from short variable names
This commit is contained in:
@@ -30,7 +30,7 @@ std::unique_ptr<SchemaBuilder> SQLiteConnection::getSchemaBuilder()
|
||||
if (!m_schemaGrammar)
|
||||
useDefaultSchemaGrammar();
|
||||
|
||||
return std::make_unique<Schema::SQLiteSchemaBuilder>(*this);
|
||||
return std::make_unique<SchemaNs::SQLiteSchemaBuilder>(*this);
|
||||
}
|
||||
|
||||
std::unique_ptr<QueryGrammar> SQLiteConnection::getDefaultQueryGrammar() const
|
||||
@@ -46,7 +46,7 @@ std::unique_ptr<QueryGrammar> SQLiteConnection::getDefaultQueryGrammar() const
|
||||
std::unique_ptr<SchemaGrammar> SQLiteConnection::getDefaultSchemaGrammar() const
|
||||
{
|
||||
// Ownership of a unique_ptr()
|
||||
auto grammar = std::make_unique<Schema::Grammars::SQLiteSchemaGrammar>();
|
||||
auto grammar = std::make_unique<SchemaNs::Grammars::SQLiteSchemaGrammar>();
|
||||
|
||||
withTablePrefix(*grammar);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user