sq/libsq/core/sqlz/sqlz_test.go
Neil O'Toole 58ccfc9ded
Json driver; refactoring of core packages (#66)
* Type Detector refactor

* json driver impl; refactoring of source.Files reader et al

* working on kind detector

* significant switcheroo of packages

* partway throught refactoring Kind

* major package switcheroo for Kind
2020-08-23 04:42:15 -06:00

24 lines
546 B
Go

package sqlz_test
import (
"database/sql"
"reflect"
"github.com/neilotoole/sq/libsq/core/sqlz"
)
// 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)
var _ stdlibColumnType = (*sqlz.FieldMeta)(nil)