@@ -330,9 +330,7 @@ type TruncateableTable interface {
330
330
// AUTO_INCREMENT sequence. These methods should only be used for tables with and AUTO_INCREMENT column in their schema.
331
331
type AutoIncrementTable interface {
332
332
Table
333
- // PeekNextAutoIncrementValue returns the next AUTO_INCREMENT value without incrementing the current
334
- // auto_increment counter.
335
- PeekNextAutoIncrementValue (ctx * Context ) (uint64 , error )
333
+ AutoIncrementGetter
336
334
// GetNextAutoIncrementValue gets the next AUTO_INCREMENT value. In the case that a table with an autoincrement
337
335
// column is passed in a row with the autoinc column failed, the next auto increment value must
338
336
// update its internal state accordingly and use the insert val at runtime.
@@ -342,6 +340,15 @@ type AutoIncrementTable interface {
342
340
AutoIncrementSetter (* Context ) AutoIncrementSetter
343
341
}
344
342
343
+ // AutoIncrementGetter provides support for reading a table's AUTO_INCREMENT value.
344
+ // This can include tables that don't implement AutoIncrementTable if the table is a read-only snapshot
345
+ // of an auto-incremented table.
346
+ type AutoIncrementGetter interface {
347
+ // PeekNextAutoIncrementValue returns the next AUTO_INCREMENT value without incrementing the current
348
+ // auto_increment counter.
349
+ PeekNextAutoIncrementValue (ctx * Context ) (uint64 , error )
350
+ }
351
+
345
352
// AutoIncrementSetter provides support for altering a table's
346
353
// AUTO_INCREMENT sequence, eg 'ALTER TABLE t AUTO_INCREMENT = 10;'
347
354
type AutoIncrementSetter interface {
0 commit comments