예제 #1
0
 /// <summary>
 /// Gets the SQL statement to generate the next unoccupied ID value for tables without auto-increment.
 /// </summary>
 /// <param name="map">The <see cref="DbTableMap"/> providing the relevant information.</param>
 /// <returns>The appropriate SQL statement.</returns>
 internal static string GetNextIdValueSql(DbTableMap map)
 {
     string idColumn = map.GetIdColumnName();
     return string.Format("select max({0}} + 1 from {1}", idColumn, map.Table);
 }