diff --git a/FAnsiSql/Discovery/QuerySyntaxHelper.cs b/FAnsiSql/Discovery/QuerySyntaxHelper.cs index 3430fb8..246deab 100644 --- a/FAnsiSql/Discovery/QuerySyntaxHelper.cs +++ b/FAnsiSql/Discovery/QuerySyntaxHelper.cs @@ -39,6 +39,9 @@ public abstract partial class QuerySyntaxHelper( /// public virtual char[] IllegalNameChars { get; } = ['.', '(', ')']; + public abstract string False { get; } + public abstract string True { get; } + /// /// Regex for identifying parameters in blocks of SQL (starts with @ or : (Oracle) /// diff --git a/FAnsiSql/Implementations/MicrosoftSQL/MicrosoftQuerySyntaxHelper.cs b/FAnsiSql/Implementations/MicrosoftSQL/MicrosoftQuerySyntaxHelper.cs index 612a6fd..5d08056 100644 --- a/FAnsiSql/Implementations/MicrosoftSQL/MicrosoftQuerySyntaxHelper.cs +++ b/FAnsiSql/Implementations/MicrosoftSQL/MicrosoftQuerySyntaxHelper.cs @@ -28,6 +28,10 @@ public sealed class MicrosoftQuerySyntaxHelper : QuerySyntaxHelper public override string CloseQualifier => "]"; + public override string False => "0"; + + public override string True => "1"; + public override TopXResponse HowDoWeAchieveTopX(int x) => new($"TOP {x}", QueryComponent.SELECT); public override string GetParameterDeclaration(string proposedNewParameterName, string sqlType) => $"DECLARE {proposedNewParameterName} AS {sqlType};"; diff --git a/FAnsiSql/Implementations/MySql/MySqlQuerySyntaxHelper.cs b/FAnsiSql/Implementations/MySql/MySqlQuerySyntaxHelper.cs index f271210..bf89e60 100644 --- a/FAnsiSql/Implementations/MySql/MySqlQuerySyntaxHelper.cs +++ b/FAnsiSql/Implementations/MySql/MySqlQuerySyntaxHelper.cs @@ -21,6 +21,10 @@ public sealed class MySqlQuerySyntaxHelper : QuerySyntaxHelper public override string CloseQualifier => "`"; + public override string False => "0"; + + public override string True => "1"; + private MySqlQuerySyntaxHelper() : base(MySqlTypeTranslater.Instance, MySqlAggregateHelper.Instance,MySqlUpdateHelper.Instance,DatabaseType.MySql)//no specific type translation required { } diff --git a/FAnsiSql/Implementations/Oracle/OracleQuerySyntaxHelper.cs b/FAnsiSql/Implementations/Oracle/OracleQuerySyntaxHelper.cs index 62aaa3d..81b8538 100644 --- a/FAnsiSql/Implementations/Oracle/OracleQuerySyntaxHelper.cs +++ b/FAnsiSql/Implementations/Oracle/OracleQuerySyntaxHelper.cs @@ -26,6 +26,10 @@ private OracleQuerySyntaxHelper() : base(OracleTypeTranslater.Instance, OracleAg public override char ParameterSymbol => ':'; + public override string False => "0"; + + public override string True => "1"; + [return: NotNullIfNotNull(nameof(s))] public override string? GetRuntimeName(string? s) { diff --git a/FAnsiSql/Implementations/PostgreSql/PostgreSqlSyntaxHelper.cs b/FAnsiSql/Implementations/PostgreSql/PostgreSqlSyntaxHelper.cs index 08de9a9..720b126 100644 --- a/FAnsiSql/Implementations/PostgreSql/PostgreSqlSyntaxHelper.cs +++ b/FAnsiSql/Implementations/PostgreSql/PostgreSqlSyntaxHelper.cs @@ -24,6 +24,10 @@ private PostgreSqlSyntaxHelper() : base(PostgreSqlTypeTranslater.Instance, Postg public override string CloseQualifier => "\""; + public override string False => "FALSE"; + + public override string True => "TRUE"; + public override bool SupportsEmbeddedParameters() => false; protected override object FormatDateTimeForDbParameter(DateTime dateTime) =>