public static string GetValue(SqlProvider.ProviderMode mode) { if (mode == SqlProvider.ProviderMode.Firebird) { return("CValue"); } return(GetValue()); }
internal bool AppliesTo(SqlProvider.ProviderMode provider) { foreach (SqlProvider.ProviderMode mode in this.providers) { if (mode == provider) { return(true); } } return(false); }
/// <summary> /// Returns true if this annotation applies to the specified provider. /// </summary> internal bool AppliesTo(SqlProvider.ProviderMode provider) { foreach (SqlProvider.ProviderMode p in providers) { if (p == provider) { return(true); } } return(false); }
// Methods internal static void ThrowIfUnsupported(SqlNode node, SqlNodeAnnotations annotations, SqlProvider.ProviderMode provider) { if (annotations.HasAnnotationType(typeof(SqlServerCompatibilityAnnotation))) { Visitor visitor = new Visitor(provider); visitor.annotations = annotations; visitor.Visit(node); if (visitor.reasons.Count > 0) { throw Error.ExpressionNotSupportedForSqlServerVersion(visitor.reasons); } } }
public SqlNamer(SqlProvider.ProviderMode mode) { visitor = new Visitor(this); this.mode = mode; c = new ConstColumns(mode); }
public ConstColumns(SqlProvider.ProviderMode mode) { this.mode = mode; }
internal Visitor(SqlFactory sql, SqlProvider.ProviderMode providerMode) { this.sql = sql; this.providerMode = providerMode; this.skipper = new SqlSelectionSkipper(this); }
/// <summary> /// Checks whether the given node is supported on the given server. /// </summary> internal static void ThrowIfUnsupported(SqlNode node, SqlNodeAnnotations annotations, SqlProvider.ProviderMode provider) { // Check to see whether there's at least one SqlServerCompatibilityAnnotation. if (annotations.HasAnnotationType(typeof(SqlServerCompatibilityAnnotation))) { Visitor visitor = new Visitor(provider); visitor.annotations = annotations; visitor.Visit(node); // If any messages were recorded, then throw an exception. if (visitor.reasons.Count > 0) { throw Error.ExpressionNotSupportedForSqlServerVersion(visitor.reasons); } } }
internal Visitor(SqlProvider.ProviderMode provider) { this.provider = provider; }
internal Visitor(SqlProvider.ProviderMode provider) { this.provider = provider; }