mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
v2 -> v3
This commit is contained in:
@ -14,18 +14,18 @@ import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gcache"
|
||||
"github.com/gogf/gf/v2/os/gcmd"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/os/gcache"
|
||||
"github.com/gogf/gf/v3/os/gcmd"
|
||||
"github.com/gogf/gf/v3/os/gctx"
|
||||
"github.com/gogf/gf/v3/os/glog"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// DB defines the interfaces for ORM operations.
|
||||
|
||||
@ -9,9 +9,9 @@ package gdb
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// iVal is used for type assert api for Val().
|
||||
|
||||
@ -14,19 +14,19 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
"github.com/gogf/gf/v2/os/gcache"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/internal/utils"
|
||||
"github.com/gogf/gf/v3/os/gcache"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// GetCore returns the underlying *Core object.
|
||||
|
||||
@ -11,13 +11,13 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gcache"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/os/gcache"
|
||||
"github.com/gogf/gf/v3/os/glog"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Config is the configuration management object.
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/os/gctx"
|
||||
)
|
||||
|
||||
// internalCtxData stores data in ctx for internal usage purpose.
|
||||
|
||||
@ -13,15 +13,15 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/encoding/gbinary"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/encoding/gbinary"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// GetFieldTypeStr retrieves and returns the field type string for certain field by name.
|
||||
|
||||
@ -16,11 +16,11 @@ import (
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/gogf/gf/v2/net/gtrace"
|
||||
"github.com/gogf/gf/v3/net/gtrace"
|
||||
)
|
||||
|
||||
const (
|
||||
traceInstrumentName = "github.com/gogf/gf/v2/database/gdb"
|
||||
traceInstrumentName = "github.com/gogf/gf/v3/database/gdb"
|
||||
traceAttrDbType = "db.type"
|
||||
traceAttrDbHost = "db.host"
|
||||
traceAttrDbPort = "db.port"
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
// Propagation defines transaction propagation behavior.
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"database/sql"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// TXCore is the struct for transaction management.
|
||||
|
||||
@ -16,14 +16,14 @@ import (
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/gogf/gf/v2"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/guid"
|
||||
"github.com/gogf/gf/v3"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/guid"
|
||||
)
|
||||
|
||||
// Query commits one query SQL to underlying driver and returns the execution result.
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// GetDB returns the underlying DB.
|
||||
|
||||
@ -11,14 +11,14 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/os/gcache"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/encoding/gjson"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/os/gcache"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// DriverWrapperDB is a DB wrapper for extending features with embedded DB.
|
||||
|
||||
@ -15,22 +15,22 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/encoding/ghash"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
"github.com/gogf/gf/v2/os/gstructs"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gmeta"
|
||||
"github.com/gogf/gf/v2/util/gtag"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/encoding/ghash"
|
||||
"github.com/gogf/gf/v3/encoding/gjson"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/internal/utils"
|
||||
"github.com/gogf/gf/v3/os/gstructs"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gmeta"
|
||||
"github.com/gogf/gf/v3/util/gtag"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// iString is the type assert api for String.
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Model is core struct implementing the DAO for ORM.
|
||||
|
||||
@ -9,7 +9,7 @@ package gdb
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
// doWhereType sets the condition statement for the model. The parameter `where` can be type of
|
||||
|
||||
@ -9,7 +9,7 @@ package gdb
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
// WhereOr adds "OR" condition to the where statement.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
)
|
||||
|
||||
// CacheOption is options for model cache control in query.
|
||||
|
||||
@ -9,10 +9,10 @@ package gdb
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
// Delete does "DELETE FROM ... " statement for the model.
|
||||
|
||||
@ -9,10 +9,10 @@ package gdb
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Fields appends `fieldNamesOrMapStruct` to the operation fields of the model, multiple fields joined using char ','.
|
||||
|
||||
@ -11,9 +11,9 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@ -11,14 +11,14 @@ import (
|
||||
"database/sql"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Batch sets the batch operation number for the model.
|
||||
|
||||
@ -9,7 +9,7 @@ package gdb
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
|
||||
|
||||
@ -9,8 +9,8 @@ package gdb
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Order sets the "ORDER BY" statement for the model.
|
||||
|
||||
@ -11,13 +11,13 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/encoding/gjson"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// All does "SELECT FROM ..." statement for the model.
|
||||
|
||||
@ -12,9 +12,9 @@ import (
|
||||
"hash/fnv"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// ShardingConfig defines the configuration for database/table sharding.
|
||||
|
||||
@ -11,15 +11,15 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
"github.com/gogf/gf/v2/os/gcache"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/utils"
|
||||
"github.com/gogf/gf/v3/os/gcache"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
)
|
||||
|
||||
// SoftTimeType custom defines the soft time field type.
|
||||
|
||||
@ -11,13 +11,13 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/internal/reflection"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/internal/reflection"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Update does "UPDATE ... " statement for the model.
|
||||
|
||||
@ -9,13 +9,13 @@ package gdb
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// QuoteWord checks given string `s` a word,
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"database/sql"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
"github.com/gogf/gf/v2/os/gstructs"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/utils"
|
||||
"github.com/gogf/gf/v3/os/gstructs"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// With creates and returns an ORM model based on metadata of given object.
|
||||
|
||||
@ -9,7 +9,7 @@ package gdb
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
// SqlResult is execution result for sql operations.
|
||||
|
||||
@ -9,10 +9,10 @@ package gdb
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/encoding/gjson"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Json converts `r` to JSON format content.
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"database/sql"
|
||||
"math"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/encoding/gjson"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// IsEmpty checks and returns whether `r` is empty.
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"database/sql"
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gstructs"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/os/gstructs"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// ScanList converts `r` to struct slice which contains other complex struct attributes.
|
||||
|
||||
@ -9,8 +9,8 @@ package gdb_test
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v3/database/gdb"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
)
|
||||
|
||||
func ExampleTransaction() {
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/text/gregex"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/text/gregex"
|
||||
)
|
||||
|
||||
func Test_GetConverter(t *testing.T) {
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
package gredis
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
// AdapterFunc is the function creating redis adapter.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// Adapter is an interface for universal redis operations.
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Config is redis configuration.
|
||||
|
||||
@ -9,8 +9,8 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -9,9 +9,9 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
// Redis client.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupGeneric manages generic redis operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupHash manages redis hash operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupList manages redis list operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupScript manages redis script operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupSet manages redis set operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupSortedSet manages redis sorted set operations.
|
||||
|
||||
@ -9,7 +9,7 @@ package gredis
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
)
|
||||
|
||||
// IGroupString manages redis string operations.
|
||||
|
||||
Reference in New Issue
Block a user