Пример #1
0
        private string GetTableName()
        {
            if (_isSubQuery)
            {
                return(_tableNames.First());
            }
            var joinExpression = string.Join(" ", _joinExpressions);

            return(string.Format("{0} {1}", _adapter.Table(_tableNames.First(), _schema), joinExpression));
        }
Пример #2
0
        public SqlBuilder(ISqlAdapter adapter, bool isEnableAlias = true)
        {
            var table = CacheHelper.GetTableInfo(typeof(T));

            Where       = new StringBuilder();
            Parameters  = new DynamicParameters();
            SelectField = new List <string> {
                "*"
            };
            TableAliasName = table.Alias;
            IsEnableAlias  = isEnableAlias;
            Adapter        = adapter;
            Table          = isEnableAlias ? Adapter.Table(table.Name, table.Alias) : Adapter.Table(table.Name);
        }
Пример #3
0
        private string GetTableName()
        {
            var joinExpression = string.Join(" ", _joinExpressions);

            return(string.Format("{0} {1}", _adapter.Table(_tableNames.First()), joinExpression));
        }