コード例 #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());
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #5
0
 public SelectQueryOptimizer(SqlProviderFlags flags, SqlStatement statement, SelectQuery selectQuery)
 {
     _flags       = flags;
     _selectQuery = selectQuery;
     _statement   = statement;
 }