refactor: remove unused AutoMigrate, SQLOFunc, JSONB.ToMap
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,9 +14,8 @@ type DBConfig struct {
|
|||||||
Password string `validate:"required"`
|
Password string `validate:"required"`
|
||||||
URI string `validate:"hostname_port,required"`
|
URI string `validate:"hostname_port,required"`
|
||||||
Name string `validate:"required"`
|
Name string `validate:"required"`
|
||||||
MaxConn int `validate:"min=1,max=1000"`
|
MaxConn int `validate:"min=1,max=1000"`
|
||||||
AutoMigrate bool
|
DebugLog bool
|
||||||
DebugLog bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConnectionString returns a connection string compatible with the given
|
// ConnectionString returns a connection string compatible with the given
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ import (
|
|||||||
"github.com/go-jet/jet/v2/qrm"
|
"github.com/go-jet/jet/v2/qrm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SQLOFunc is a function that returns a *sql.DB pointer.
|
|
||||||
type SQLOFunc = func() *sql.DB
|
|
||||||
|
|
||||||
// Queryable interface is an SQL driver object that can execute SQL statements
|
// Queryable interface is an SQL driver object that can execute SQL statements
|
||||||
// for Jet.
|
// for Jet.
|
||||||
type Queryable interface {
|
type Queryable interface {
|
||||||
|
|||||||
@@ -15,11 +15,6 @@ func NewJSONB(data map[string]any) JSONB {
|
|||||||
return JSONB(data)
|
return JSONB(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToMap converts the JSONB value to a map[string]any.
|
|
||||||
func (j JSONB) ToMap() map[string]any {
|
|
||||||
return map[string]any(j)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scan implements the sql.Scanner interface. It supports converting from
|
// Scan implements the sql.Scanner interface. It supports converting from
|
||||||
// string, []byte, or nil into a JSONB value. Attempting to convert from
|
// string, []byte, or nil into a JSONB value. Attempting to convert from
|
||||||
// any other type will return an error.
|
// any other type will return an error.
|
||||||
|
|||||||
Reference in New Issue
Block a user