public SybaseDataProvider(string name) : base(name, MappingSchemaInstance.Get(name), SybaseProviderAdapter.GetInstance(name)) { SqlProviderFlags.AcceptsTakeAsParameter = false; SqlProviderFlags.IsSkipSupported = false; SqlProviderFlags.IsSubQueryTakeSupported = false; //SqlProviderFlags.IsCountSubQuerySupported = false; SqlProviderFlags.CanCombineParameters = false; SqlProviderFlags.IsSybaseBuggyGroupBy = true; SqlProviderFlags.IsCrossJoinSupported = false; SqlProviderFlags.IsSubQueryOrderBySupported = false; SqlProviderFlags.IsDistinctOrderBySupported = false; SqlProviderFlags.IsDistinctSetOperationsSupported = false; SqlProviderFlags.IsGroupByExpressionSupported = false; SetCharField("char", (r, i) => r.GetString(i).TrimEnd(' ')); SetCharField("nchar", (r, i) => r.GetString(i).TrimEnd(' ')); SetCharFieldToType <char>("char", DataTools.GetCharExpression); SetCharFieldToType <char>("nchar", DataTools.GetCharExpression); SetProviderField <IDataReader, TimeSpan, DateTime>((r, i) => r.GetDateTime(i) - new DateTime(1900, 1, 1)); SetField <IDataReader, DateTime>("time", (r, i) => GetDateTimeAsTime(r.GetDateTime(i))); _sqlOptimizer = new SybaseSqlOptimizer(SqlProviderFlags); }
protected SybaseDataProvider(string name, MappingSchema mappingSchema) : base(name, mappingSchema) { SqlProviderFlags.AcceptsTakeAsParameter = false; SqlProviderFlags.IsSkipSupported = false; SqlProviderFlags.IsSubQueryTakeSupported = false; SqlProviderFlags.IsCountSubQuerySupported = false; SqlProviderFlags.CanCombineParameters = false; SetCharField("char", (r, i) => r.GetString(i).TrimEnd()); SetCharField("nchar", (r, i) => r.GetString(i).TrimEnd()); SetProviderField <IDataReader, TimeSpan, DateTime>((r, i) => r.GetDateTime(i) - new DateTime(1900, 1, 1)); SetProviderField <IDataReader, DateTime, DateTime>((r, i) => GetDateTime(r, i)); _sqlOptimizer = new SybaseSqlOptimizer(SqlProviderFlags); }
public SybaseDataProvider(string name) : base(name, null) { SqlProviderFlags.AcceptsTakeAsParameter = false; SqlProviderFlags.IsSkipSupported = false; SqlProviderFlags.IsSubQueryTakeSupported = false; //SqlProviderFlags.IsCountSubQuerySupported = false; SqlProviderFlags.CanCombineParameters = false; SqlProviderFlags.IsSybaseBuggyGroupBy = true; SqlProviderFlags.IsCrossJoinSupported = false; SetCharField("char", (r, i) => r.GetString(i).TrimEnd(' ')); SetCharField("nchar", (r, i) => r.GetString(i).TrimEnd(' ')); SetCharFieldToType <char>("char", (r, i) => DataTools.GetChar(r, i)); SetCharFieldToType <char>("nchar", (r, i) => DataTools.GetChar(r, i)); SetProviderField <IDataReader, TimeSpan, DateTime>((r, i) => r.GetDateTime(i) - new DateTime(1900, 1, 1)); SetProviderField <IDataReader, DateTime, DateTime>((r, i) => GetDateTime(r, i)); _sqlOptimizer = new SybaseSqlOptimizer(SqlProviderFlags); }