-
Notifications
You must be signed in to change notification settings - Fork 198
SQLQueryStringToPure Notes
Ephrim Stanley edited this page Feb 16, 2022
·
3 revisions
Database specific logic scattered throughout SQLQueryStringToPure
Example
let specific = if ($dbType == DatabaseType.SybaseIQ,
| getLiteralProcessorsForSybaseIQ($dbTimeZone),
| if($dbType == DatabaseType.Sybase,
| getLiteralProcessorsForSybaseASE($dbTimeZone),
| if ($dbType == DatabaseType.Postgres,
| getLiteralProcessorsForPostgres($dbTimeZone),
| if ($dbType == DatabaseType.Presto,
| getLiteralProcessorsForPresto($dbTimeZone),
| newMap([]->cast(@Pair<Type, LiteralProcessor>))
))));
function <<access.private>> meta::relational::functions::sqlQueryToString::databaseUsesTopForTake(dbType:DatabaseType[1]):Boolean[1]
{
$dbType != DatabaseType.MemSQL && $dbType != DatabaseType.Postgres && $dbType != DatabaseType.DB2 && $dbType != DatabaseType.Snowflake && $dbType != DatabaseType.Presto && $dbType != DatabaseType.BigQuery && $dbType != DatabaseType.Databricks;
}
Do we need an abstract similar to DatabaseCommands in legend-engine that lets us plug in database specific behavior without making changes to SQLQueryStringToPure ?
- For Legend Users
- For Legend Maintainers