public static SqlFromClause.Join Join(this ISqlTableSource table, string alias, params SqlFromClause.Join[] joins) { return(new SqlFromClause.Join(JoinType.Auto, table, alias, false, joins)); }
/// <summary> /// Sets the FROM value. If null or whitespace or not specified the macro placeholder #__TableName will be used automaticly /// </summary> /// <param name="tableName">TableName or Table-Valued Function Name with parameters, excluding FROM keyword</param> /// <returns></returns> public virtual SqlQuery From(string tableName) { this.fromFragment = new SqlTableSource(tableName); return this; }
public static SqlFromClause.Join WeakJoin(this ISqlTableSource table, string alias, params SqlFromClause.Join[] joins) { return(SelectQuery.WeakJoin(table, alias, joins)); }
public static SqlFromClause.Join LeftJoin(this ISqlTableSource table, params SqlFromClause.Join[] joins) { return(new SqlFromClause.Join(JoinType.Left, table, null, false, joins)); }
public static SqlFromClause.Join OuterApply(this ISqlTableSource table, params SqlFromClause.Join[] joins) { return(SelectQuery.OuterApply(table, joins)); }
public static SqlFromClause.Join WeakLeftJoin(this ISqlTableSource table, params SqlFromClause.Join[] joins) { return(SelectQuery.WeakLeftJoin(table, joins)); }
public SqlTableSource(ISqlTableSource source, string alias) : this(source, alias, null) { }
public static SelectQuery.FromClause.Join OuterApply(this ISqlTableSource table, string alias, params SelectQuery.FromClause.Join[] joins) { return(SelectQuery.OuterApply(table, alias, joins)); }
public SqlTableSource? this[ISqlTableSource table] => this[table, null];
public SqlFromClause Table(ISqlTableSource table, params Join[] joins) { return(Table(table, null, joins)); }
public abstract ISqlTableSource GetTableSource(ISqlTableSource table);
public static SqlFunction CreateCount(Type type, ISqlTableSource table) { return(new SqlFunction(type, "Count", table.All)); }
public static SelectQuery.FromClause.Join InnerJoin(this ISqlTableSource table, params SelectQuery.FromClause.Join[] joins) { return(SelectQuery.InnerJoin(table, joins)); }
/// <summary> /// Sets the FROM value. If null the macro placeholder #__TableName will be used automaticly. /// </summary> /// <param name="subQuery">SqlQuery or other ISqlTableSource</param> /// /// <param name="alias">alias for the ISqlTableSource</param> /// <returns></returns> public virtual SqlQuery From(ISqlTableSource subQuery,string alias) { this.fromFragment = subQuery; this.fromSubQueryAlias = alias; return this; }
public static SqlFunction CreateCount(Type type, ISqlTableSource table) { return(new SqlFunction(type, "Count", new SqlExpression("*"))); }
static bool ContainsTable(ISqlTableSource table, IQueryElement sql) { return null != new QueryVisitor().Find(sql, e => e == table || e.ElementType == QueryElementType.SqlField && table == ((SqlField)e).Table || e.ElementType == QueryElementType.Column && table == ((SelectQuery.Column) e).Parent); }
public static SelectQuery.FromClause.Join CrossApply(this ISqlTableSource table, params SelectQuery.FromClause.Join[] joins) { return(SelectQuery.CrossApply(table, joins)); }