getBigIdStrategySQL static method
Get big version of ID strategy SQL
Implementation
static String getBigIdStrategySQL(
IDStrategy strategy,
DatabaseType dbType,
) {
switch (strategy) {
case IDStrategy.serial:
return 'BIGSERIAL';
case IDStrategy.autoIncrement:
switch (dbType) {
case DatabaseType.postgresql:
return 'BIGSERIAL';
case DatabaseType.mysql:
return 'AUTO_INCREMENT';
case DatabaseType.sqlite:
return 'AUTOINCREMENT';
}
case IDStrategy.autoIncrementSqlite:
return 'AUTOINCREMENT';
case IDStrategy.uuid:
switch (dbType) {
case DatabaseType.postgresql:
return 'UUID DEFAULT gen_random_uuid()';
case DatabaseType.mysql:
return 'CHAR(36)';
case DatabaseType.sqlite:
return 'TEXT';
}
}
}