mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-21 15:11:39 +03:00
2f2dfd6e47
- Implement `sq diff --data`.
26 lines
552 B
Go
26 lines
552 B
Go
package sqlz_test
|
|
|
|
import (
|
|
"database/sql"
|
|
"reflect"
|
|
|
|
"github.com/neilotoole/sq/libsq/core/record"
|
|
)
|
|
|
|
// stdlibColumnType exists to verify that sql.ColumnType
|
|
// and FieldMeta conform to a common (sql.ColumnType's)
|
|
// method set.
|
|
type stdlibColumnType interface {
|
|
Name() string
|
|
Length() (length int64, ok bool)
|
|
DecimalSize() (precision, scale int64, ok bool)
|
|
ScanType() reflect.Type
|
|
Nullable() (nullable, ok bool)
|
|
DatabaseTypeName() string
|
|
}
|
|
|
|
var (
|
|
_ stdlibColumnType = (*sql.ColumnType)(nil)
|
|
_ stdlibColumnType = (*record.FieldMeta)(nil)
|
|
)
|