MCPcopy Create free account
hub / github.com/apecloud/myduckserver / getNextAutoIncrementValue

Method getNextAutoIncrementValue

catalog/table.go:795–816  ·  view source on GitHub ↗
(ctx *sql.Context)

Source from the content-addressed store, hash-verified

793 `, catalogName, schemaName, tableName, tableName)
794 if err != nil {
795 return nil, err
796 }
797 defer rows.Close()
798
799 var columns []*ColumnInfo
800
801 for rows.Next() {
802 var columnName, dataTypes string
803 var columnIndex int
804 var isNullable bool
805 var comment, columnDefault stdsql.NullString
806 var numericPrecision, numericScale stdsql.NullInt32
807
808 if err := rows.Scan(&columnName, &columnIndex, &dataTypes, &isNullable, &columnDefault, &comment, &numericPrecision, &numericScale); err != nil {
809 return nil, err
810 }
811
812 decodedComment := DecodeComment[MySQLType](comment.String)
813 dataType, err := mysqlDataType(AnnotatedDuckType{dataTypes, decodedComment.Meta}, uint8(numericPrecision.Int32), uint8(numericScale.Int32))
814 if err != nil {
815 return nil, err
816 }
817
818 columnInfo := &ColumnInfo{
819 ColumnName: columnName,

Callers 2

Calls 1

QueryRowCatalogFunction · 0.92

Tested by

no test coverage detected