/// <summary> /// This is internal API and is not intended for use by Linq To DB applications. /// It may change or be removed without further notice. /// </summary> public static SqlField GetIdentityField(this SqlStatement statement) { return(statement.GetInsertClause()?.Into.GetIdentityField()); }
/// <summary> /// This is internal API and is not intended for use by Linq To DB applications. /// It may change or be removed without further notice. /// </summary> public static bool IsUpdate(this SqlStatement statement) { return(statement != null && statement.QueryType == QueryType.Update); }
/// <summary> /// This is internal API and is not intended for use by Linq To DB applications. /// It may change or be removed without further notice. /// </summary> public static bool IsInsert(this SqlStatement statement) { return (statement.QueryType == QueryType.Insert || statement.QueryType == QueryType.InsertOrUpdate); }
/// <summary> /// This is internal API and is not intended for use by Linq To DB applications. /// It may change or be removed without further notice. /// </summary> public static bool NeedsIdentity(this SqlStatement statement) { return(statement.QueryType == QueryType.Insert && ((SqlInsertStatement)statement).Insert.WithIdentity); }
public SelectQueryOptimizer(SqlProviderFlags flags, SqlStatement statement, SelectQuery selectQuery) { _flags = flags; _selectQuery = selectQuery; _statement = statement; }