• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ISqlDialect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DropTableWriter

        public DropTableWriter(ISqlDialect dialect) {
            if (dialect == null) {
                throw new ArgumentNullException("dialect");
            }

            this.dialect = dialect;
        }
开发者ID:Polylytics,项目名称:dashing,代码行数:7,代码来源:DropTableWriter.cs


示例2: ToSql

        public static string ToSql(this DateTime value, ISqlDialect dialect = null)
        {
            if (value.Date == value)
                return value.ToString((dialect ?? SqlSettings.DefaultDialect).DateFormat, Invariants.DateTimeFormat);

            return value.ToString((dialect ?? SqlSettings.DefaultDialect).DateTimeFormat, Invariants.DateTimeFormat);
        }
开发者ID:CodeFork,项目名称:Serenity,代码行数:7,代码来源:SqlConversions.cs


示例3: DelimitedDbStatement

 public DelimitedDbStatement(
     ISqlDialect dialect,
     TransactionScope scope,
     IDbConnection connection,
     IDbTransaction transaction)
     : base(dialect, scope, connection, transaction)
 {}
开发者ID:jamescrowley,项目名称:NEventStore,代码行数:7,代码来源:DelimitedDbStatement.cs


示例4: InheritedSqlPersistenceEngine

 public InheritedSqlPersistenceEngine(
     IConnectionFactory connectionFactory,
     ISqlDialect dialect,
     ISerialize serializer,
     TransactionScopeOption scopeOption, int pageSize) 
     : base(connectionFactory, dialect, serializer, scopeOption, pageSize)
 {}
开发者ID:hawkins6423,项目名称:NEventStore,代码行数:7,代码来源:SqlPersistenceEngineTests.cs


示例5: ToString

 public string ToString(ISqlDialect dialect)
 {
     var sql = new StringBuilder();
     sql.AppendFormat("delete from {0}", table);
     if (where != Exp.Empty) sql.AppendFormat(" where {0}", where.ToString(dialect));
     return sql.ToString();
 }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:7,代码来源:SqlDelete.cs


示例6: ToSql

        public static string ToSql(this string value, ISqlDialect dialect = null)
        {
            if (value == null)
                return Null;

            return (dialect ?? SqlSettings.DefaultDialect).QuoteUnicodeString(value);
        }
开发者ID:VictorTomaili,项目名称:Sanity,代码行数:7,代码来源:SqlConversions.cs


示例7: ReverseEngineer

        public IEnumerable<IMap> ReverseEngineer(
            DatabaseSchema schema,
            ISqlDialect sqlDialect,
            IEnumerable<string> tablesToIgnore,
            IAnswerProvider answerProvider,
            bool fixOneToOnes) {
            if (tablesToIgnore == null) {
                tablesToIgnore = new string[0];
            }

            var maps = new List<IMap>();
            this.configuration = new Configuration(sqlDialect);
            foreach (var table in schema.Tables.Where(t => !tablesToIgnore.Contains(t.Name))) {
                maps.Add(this.MapTable(table));
            }

            // go back through and add indexes and foreign keys
            foreach (var map in maps) {
                GetIndexesAndForeignKeys(schema.Tables.First(t => t.Name == map.Table), map);
            }

            // go back through and try to spot one-to-one columns
            if (fixOneToOnes) {
                foreach (var map in maps) {
                    FindOneToOnes(map, answerProvider);
                }
            }

            return maps;
        }
开发者ID:Polylytics,项目名称:dashing,代码行数:30,代码来源:Engineer.cs


示例8: ToString

 public override string ToString(ISqlDialect dialect)
 {
     return string.Format("{0} {1} {2}",
                          column1.ToString(dialect),
                          Not ? "<>" : "=",
                          column2.ToString(dialect));
 }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:7,代码来源:EqColumnsExp.cs


示例9: Append

        public void Append(StringBuilder stringBuilder, ISqlDialect dialect) {
            if (this.Node != null) {
                stringBuilder.Append(this.Node.Alias).Append(".");
            }

            dialect.AppendQuotedName(stringBuilder, this.columnName);
        }
开发者ID:Polylytics,项目名称:dashing,代码行数:7,代码来源:ColumnElement.cs


示例10: ForConnection

        public ICreateSessionFactory ForConnection(string connectionName, ISqlDialect sqlDialect, IDbDriver dbDriver)
        {
            if (connectionName == null)
            {
                throw new ArgumentNullException("connectionName");
            }

            if (sqlDialect == null)
            {
                throw new ArgumentNullException("sqlDialect");
            }

            if (dbDriver == null)
            {
                throw new ArgumentNullException("dbDriver");
            }

            var configSection = ConfigurationManager.ConnectionStrings[connectionName];

            if (configSection == null)
            {
                throw new ConfigurationException(ExceptionMessages.FluentConfiguration_ConnectionNotFound.FormatWith(connectionName));
            }

            this.chosenConnectionName = configSection.Name;
            this.chosenSqlDialect = sqlDialect;
            this.chosenDbDriver = dbDriver;
            this.chosenDbDriver.ConnectionString = configSection.ConnectionString;
            this.chosenDbDriver.DbProviderFactory = DbProviderFactories.GetFactory(configSection.ProviderName);

            return this;
        }
开发者ID:rubenalves,项目名称:MicroLite,代码行数:32,代码来源:FluentConfiguration.cs


示例11: Dump

        public static string Dump(string sql, IDictionary<string, object> parameters, ISqlDialect dialect = null)
        {
            if (parameters == null)
                return sql;

            var param = parameters.ToList();
            for (var i = 0; i < param.Count; i++)
            {
                var name = param[i].Key;
                if (!name.StartsWith("@"))
                    param[i] = new KeyValuePair<string,object>("@" + name, param[i].Value);
            }

            param.Sort((x, y) => y.Key.Length.CompareTo(x.Key.Length));

            var sb = new StringBuilder(sql);
            foreach (var pair in param)
                sb.Replace(pair.Key, DumpParameterValue(pair.Value, dialect));

            var text = DatabaseCaretReferences.Replace(sb.ToString());

            dialect = dialect ?? SqlSettings.DefaultDialect;
            var openBracket = dialect.OpenQuote;
            if (openBracket != '[')
                text = BracketLocator.ReplaceBrackets(text, dialect);

            var paramPrefix = dialect.ParameterPrefix;
            if (paramPrefix != '@')
                text = ParamPrefixReplacer.Replace(text, paramPrefix);

            return text;
        }
开发者ID:CodeFork,项目名称:Serenity,代码行数:32,代码来源:SqlDebugDumper.cs


示例12: SessionFactory

        internal SessionFactory(string connectionName, IDbDriver dbDriver, ISqlDialect sqlDialect)
        {
            this.connectionName = connectionName;
            this.dbDriver = dbDriver;
            this.sqlDialect = sqlDialect;

            this.sessionListeners = new SessionListeners(Listener.DeleteListeners, Listener.InsertListener, Listener.UpdateListeners);
        }
开发者ID:TrevorPilley,项目名称:MicroLite,代码行数:8,代码来源:SessionFactory.cs


示例13: DynamicSQLinqJoinExpression

 /// <summary>
 /// Creates a new DynamicSQLinqJoinExpression instance
 /// </summary>
 /// <param name="tableName">The database Table / View to Join</param>
 /// <param name="joinOperator">The JOIN operator</param>
 /// <param name="clause">The Join clause</param>
 /// <param name="parameters">Any parameter values necessary for the Join clause</param>
 public DynamicSQLinqJoinExpression(ISqlDialect dialect, string tableName, DynamicSQLinqJoinOperator joinOperator, string clause, object[] parameters)
 {
     this.Dialect = dialect;
     this.Table = tableName;
     this.JoinOperator = joinOperator;
     this.Clause = clause;
     this.Parameters = parameters;
 }
开发者ID:daywrite,项目名称:SQLinq,代码行数:15,代码来源:DynamicSQLinqJoinExpression.cs


示例14: FirebirdDbStatement

            public FirebirdDbStatement(
				ISqlDialect dialect,
				IDbConnection connection,
				IDbTransaction transaction,
				params IDisposable[] resources)
                : base(dialect, connection, transaction, resources)
            {
            }
开发者ID:JontyMC,项目名称:EventStore,代码行数:8,代码来源:FirebirdSqlDialect.cs


示例15: CustomSqlPersistenceFactory

 public CustomSqlPersistenceFactory(IConnectionFactory factory, ISerialize serializer, ISqlDialect dialect, TransactionScopeOption scopeOption, int pageSize) : base(factory, serializer, dialect, scopeOption, pageSize)
 {
     this.factory = factory;
     this.serializer = serializer;
     this.dialect = dialect;
     this.scopeOption = scopeOption;
     this.pageSize = pageSize;
 }
开发者ID:raghur,项目名称:Eventstore.Utils,代码行数:8,代码来源:CustomSqlPersistenceFactory.cs


示例16: DynamicSQLinqSubQueryJoinExpression

 /// <summary>
 /// Creates a new DynamicSQLinqSubQueryJoinExpression instance
 /// </summary>
 /// <param name="query">The sub-query that will be joined</param>
 /// <param name="alias">The Alias to give the sub-query within the main query</param>
 /// <param name="joinOperator">The JOIN operator</param>
 /// <param name="clause">The Join clause</param>
 /// <param name="parameters">Any parameters necessary for the Join clause</param>
 public DynamicSQLinqSubQueryJoinExpression(ISqlDialect dialect, ISQLinq query, string alias, DynamicSQLinqJoinOperator joinOperator, string clause, params object[] parameters)
 {
     this.Dialect = dialect;
     this.Query = query;
     this.Alias = alias;
     this.JoinOperator = joinOperator;
     this.Clause = clause;
     this.Parameters = parameters;
 }
开发者ID:daywrite,项目名称:SQLinq,代码行数:17,代码来源:DynamicSQLinqSubQueryJoinExpression.cs


示例17: DrapperManager

        protected DrapperManager(ISqlGenerator generator, IDbConnection dbConnection, ISqlDialect dialect)
        {
            Dialect = dialect;
            Generator = generator;
            DbConnection = dbConnection;
            Database = new Database(dbConnection, generator);

            Init();
        }
开发者ID:git00n1,项目名称:DapperRepository,代码行数:9,代码来源:DrapperDbManager.cs


示例18: ToString

 public override string ToString(ISqlDialect dialect)
 {
     string format = exp1 is JunctionExp && ((JunctionExp) exp1).and != and ? "({0})" : "{0}";
     format += " {1} ";
     format += exp2 is JunctionExp && ((JunctionExp) exp2).and != and ? "({2})" : "{2}";
     return Not
                ? string.Format(format, (!exp1).ToString(dialect), and ? "or" : "and",
                                (!exp2).ToString(dialect))
                : string.Format(format, exp1.ToString(dialect), and ? "and" : "or", exp2.ToString(dialect));
 }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:10,代码来源:JunctionExp.cs


示例19: InvokeGetKeywords

 public static HashSetEx<string> InvokeGetKeywords(ISqlDialect dialect)
 {
     if (GetKeywords == null) return null;
     var args = new GetKeyboardsEventArgs
         {
             Dialect = dialect,
         };
     GetKeywords(args);
     return args.Keywords;
 }
开发者ID:dbshell,项目名称:dbshell,代码行数:10,代码来源:KeywordsProvider.cs


示例20: AbsoluteOrderingSqlPersistenceEngine

 public AbsoluteOrderingSqlPersistenceEngine(IConnectionFactory connectionFactory, 
     ISqlDialect dialect, 
     IPipelineStoreSqlDialect pipelineStoreSqlDialect,
     ISerialize serializer, bool transactional)
     : base(connectionFactory, dialect, serializer)
 {
     _dialect = pipelineStoreSqlDialect;
     _transactional = transactional;
     _serializer = serializer;
 }
开发者ID:VincentSchippefilt,项目名称:ncqrs,代码行数:10,代码来源:AbsoluteOrderingSqlPersistenceEngine.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISqlExpression类代码示例发布时间:2022-05-24
下一篇:
C# ISqlBuilder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap