Adds q2 repos to migrate
This commit is contained in:
1 parent
ad1f62c4ee
commit
17f1c61c9e
991 files changed
+178451
No files matched your search
Executable
+41
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ngldb_export.h"
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
namespace DBCommon
|
||||
{
|
||||
|
||||
enum class eDatabaseSchema
|
||||
{
|
||||
Exercise
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline QString getExerciseSchemaName(int exerciseId)
|
||||
{
|
||||
return QLatin1String("ex_") + QString::number(exerciseId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline QString getTableName(const QString &tableName, const QString &schemaName)
|
||||
{
|
||||
if (schemaName.isEmpty())
|
||||
return tableName;
|
||||
return schemaName + QLatin1Char('.') + tableName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline QString getExerciseTableName(const QString &tableName, int exerciseId)
|
||||
{
|
||||
return getTableName(tableName, getExerciseSchemaName(exerciseId));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user