Beispiel #1
0
 /// <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());
 }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 /// <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);
 }
Beispiel #4
0
 /// <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;
 }