当前位置: 首页>>代码示例>>C#>>正文


C# Schema.DatabaseSchema类代码示例

本文整理汇总了C#中Simple.Data.Ado.Schema.DatabaseSchema的典型用法代码示例。如果您正苦于以下问题:C# DatabaseSchema类的具体用法?C# DatabaseSchema怎么用?C# DatabaseSchema使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DatabaseSchema类属于Simple.Data.Ado.Schema命名空间,在下文中一共展示了DatabaseSchema类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CommandBuilder

 public CommandBuilder(string text, DatabaseSchema schema, int bulkIndex)
 {
     _text = new StringBuilder(text);
     _schemaProvider = schema.SchemaProvider;
     _customInterfaceProvider = schema.ProviderHelper;
     _parameterSuffix = (bulkIndex >= 0) ? "_c" + bulkIndex : string.Empty;
 }
开发者ID:reverentgeek,项目名称:Simple.Data,代码行数:7,代码来源:CommandBuilder.cs

示例2: OracleProcedureExecutor

 public OracleProcedureExecutor(OracleConnectionProvider connectionProvider, ObjectName procedureName)
 {
     _connectionProvider = connectionProvider;
     _schema = DatabaseSchema.Get(_connectionProvider, new ProviderHelper());
     _procedureName = procedureName;
     _executeImpl = ExecuteReader;
 }
开发者ID:jdscolam,项目名称:Simple.Data.Oracle,代码行数:7,代码来源:OracleProcedureExecutor.cs

示例3: OnSetup

 protected override void OnSetup()
 {
     var settingsKeys = ((IDictionary<string, object>) Settings).Keys;
     if (settingsKeys.Contains("ConnectionString"))
     {
         if (settingsKeys.Contains("ProviderName"))
         {
             _connectionProvider = ProviderHelper.GetProviderByConnectionString(Settings.ConnectionString,
                                                                                Settings.ProviderName);
         }
         else
         {
             _connectionProvider = ProviderHelper.GetProviderByConnectionString(Settings.ConnectionString);
         }
     }
     else if (settingsKeys.Contains("Filename"))
     {
         _connectionProvider = ProviderHelper.GetProviderByFilename(Settings.Filename);
     }
     else if (settingsKeys.Contains("ConnectionName"))
     {
         _connectionProvider = ProviderHelper.GetProviderByConnectionName(Settings.ConnectionName);
     }
     _schema = DatabaseSchema.Get(_connectionProvider, _providerHelper);
     _relatedFinder = new Lazy<AdoAdapterRelatedFinder>(CreateRelatedFinder);
     _commandOptimizer = ProviderHelper.GetCustomProvider<CommandOptimizer>(_connectionProvider) ??
                         new CommandOptimizer();
 }
开发者ID:ChrisMH,项目名称:Simple.Data,代码行数:28,代码来源:AdoAdapter.cs

示例4: AdoAdapter

 internal AdoAdapter(IConnectionProvider connectionProvider) : this()
 {
     _connectionProvider = connectionProvider;
     _schema = DatabaseSchema.Get(_connectionProvider, _providerHelper);
     _relatedFinder = new Lazy<AdoAdapterRelatedFinder>(CreateRelatedFinder);
     _commandOptimizer = ProviderHelper.GetCustomProvider<CommandOptimizer>(_connectionProvider) ??
                         new CommandOptimizer();
 }
开发者ID:loozhang,项目名称:Simple.Data,代码行数:8,代码来源:AdoAdapter.cs

示例5: CommandBuilder

 public CommandBuilder(string text, DatabaseSchema schema, IEnumerable<KeyValuePair<ParameterTemplate, Object>> parameters)
     : this(text, schema, -1)
 {
     foreach (var kvp in parameters)
     {
         _parameters.Add(kvp.Key, kvp.Value);
     }
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:8,代码来源:CommandBuilder.cs

示例6: ExpressionFormatter

 public ExpressionFormatter(ICommandBuilder commandBuilder, DatabaseSchema schema)
 {
     _commandBuilder = commandBuilder;
     _schema = schema;
     _expressionFormatters = new Dictionary<SimpleExpressionType, Func<SimpleExpression, string>>
           {
               {SimpleExpressionType.And, LogicalExpressionToWhereClause},
               {SimpleExpressionType.Or, LogicalExpressionToWhereClause},
               {SimpleExpressionType.Equal, EqualExpressionToWhereClause},
               {SimpleExpressionType.NotEqual, NotEqualExpressionToWhereClause},
               {SimpleExpressionType.GreaterThan, expr => BinaryExpressionToWhereClause(expr, ">")},
               {SimpleExpressionType.GreaterThanOrEqual, expr => BinaryExpressionToWhereClause(expr, ">=")},
               {SimpleExpressionType.LessThan, expr => BinaryExpressionToWhereClause(expr, "<")},
               {SimpleExpressionType.LessThanOrEqual, expr => BinaryExpressionToWhereClause(expr, "<=")},
           };
 }
开发者ID:robashton,项目名称:Simple.Data,代码行数:16,代码来源:ExpressionFormatter.cs

示例7: CreateParameters

        private IEnumerable<IDbDataParameter> CreateParameters(DatabaseSchema schema, IDbCommand command, IEnumerable<object> parameterValues)
        {
            var fixedParameters = _parameters.Where(pt => pt.Type == ParameterType.FixedValue).ToArray();
            if ((!parameterValues.Any(pv => pv != null)) && fixedParameters.Length == 0) yield break;
            parameterValues = parameterValues.Where(pv => pv != null);

            foreach (var fixedParameter in fixedParameters)
            {
                yield return CreateParameter(command, fixedParameter, fixedParameter.FixedValue);
            }
            
            var columnParameters = _parameters.Where(pt => pt.Type != ParameterType.FixedValue).ToArray();

            foreach (var parameter in parameterValues.Any(o => o is IEnumerable && !(o is string)) || parameterValues.Any(o => o is IRange)
                       ? parameterValues.SelectMany((v, i) => CreateParameters(schema, command, columnParameters[i], v))
                       : parameterValues.Select((v, i) => CreateParameter(command, columnParameters[i], v)))
            {
                yield return parameter;
            }
        }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:20,代码来源:CommandTemplate.cs

示例8: Joiner

 public Joiner(JoinType joinType, DatabaseSchema schema)
 {
     if (schema == null) throw new ArgumentNullException("schema");
     _joinType = joinType;
     _schema = schema;
 }
开发者ID:kppullin,项目名称:Simple.Data,代码行数:6,代码来源:Joiner.cs

示例9: AdoAdapter

 internal AdoAdapter(IConnectionProvider connectionProvider)
 {
     _connectionProvider = connectionProvider;
     _schema = DatabaseSchema.Get(_connectionProvider);
     _relatedFinder = new Lazy<AdoAdapterRelatedFinder>(CreateRelatedFinder);
 }
开发者ID:ToJans,项目名称:Simple.Data,代码行数:6,代码来源:AdoAdapter.cs

示例10: ExpressionFormatter

 public ExpressionFormatter(ICommandBuilder commandBuilder, DatabaseSchema schema)
 {
     _commandBuilder = commandBuilder;
     _schema = schema;
     _simpleReferenceFormatter = new SimpleReferenceFormatter(_schema, _commandBuilder);
 }
开发者ID:reverentgeek,项目名称:Simple.Data,代码行数:6,代码来源:ExpressionFormatter.cs

示例11: FindHelper

 public FindHelper(DatabaseSchema schema)
 {
     _schema = schema;
     _commandBuilder = new CommandBuilder(schema.SchemaProvider);
     _expressionFormatter = new ExpressionFormatter(_commandBuilder, _schema);
 }
开发者ID:jamezor,项目名称:Simple.Data,代码行数:6,代码来源:FindHelper.cs

示例12: GetHelper

 public GetHelper(DatabaseSchema schema)
 {
     _schema = schema;
     _commandBuilder = new CommandBuilder(schema);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:5,代码来源:FindHelper.cs

示例13: ExpressionFormatter

 public ExpressionFormatter(ICommandBuilder commandBuilder, DatabaseSchema schema)
 {
     _commandBuilder = commandBuilder;
     _schema = schema;
 }
开发者ID:fzawada,项目名称:Simple.Data,代码行数:5,代码来源:ExpressionFormatter.cs

示例14: GetSchema

 public DatabaseSchema GetSchema()
 {
     return _schema ?? (_schema = DatabaseSchema.Get(_connectionProvider, _providerHelper));
 }
开发者ID:loozhang,项目名称:Simple.Data,代码行数:4,代码来源:AdoAdapter.cs

示例15: OnReset

 protected override void OnReset()
 {
     DatabaseSchema.ClearCache();
     _schema = DatabaseSchema.Get(_connectionProvider, _providerHelper);
 }
开发者ID:loozhang,项目名称:Simple.Data,代码行数:5,代码来源:AdoAdapter.cs


注:本文中的Simple.Data.Ado.Schema.DatabaseSchema类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。