Documentation
¶
Index ¶
- Variables
- func Compare(a, b any) int
- func ExtractAndMapColumnType(columnType string, typeMapping map[string]types.DataType) types.DataType
- func FormatCursorValue(cursorValue any) any
- func MaximumOnDataType[T any](typ types.DataType, a, b T) (T, error)
- func ReformatBool(v interface{}) (bool, error)
- func ReformatByteArraysToString(data map[string]any) map[string]any
- func ReformatDate(v interface{}) (time.Time, error)
- func ReformatFloat32(v interface{}) (float32, error)
- func ReformatFloat64(v interface{}) (float64, error)
- func ReformatGeoType(v any) (any, error)
- func ReformatInt32(v any) (int32, error)
- func ReformatInt64(v any) (int64, error)
- func ReformatRecord(fields Fields, record types.Record) error
- func ReformatValue(dataType types.DataType, v any) (any, error)
- func ReformatValueOnDataTypes(datatypes []types.DataType, v any) (any, error)
- func Resolve(stream *types.Stream, objects ...map[string]interface{}) error
- func TypeFromValue(v interface{}) types.DataType
- type Field
- type Fields
- func (f Fields) Add(other Fields)
- func (f Fields) Clone() Fields
- func (f Fields) FromSchema(schema *types.TypeSchema)
- func (f Fields) Header() (header []string)
- func (f Fields) Merge(other Fields)
- func (f Fields) OverrideTypes(other Fields)
- func (f Fields) Process(record types.Record) (bool, bool, Fields)
- func (f Fields) ToProperties() map[string]*types.Property
- func (f Fields) ToTypeSchema() *types.TypeSchema
- type Flattener
- type FlattenerImpl
- type StringInterface
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var DateTimeFormats = []string{
"2006-01-02",
"2006-01-02 15:04:05",
"2006-01-02 15:04:05 -07:00",
"2006-01-02 15:04:05-07:00",
"2006-01-02 15:04:05 -0700 MST",
"2006-01-02T15:04:05",
"2006-01-02T15:04:05.000000",
"2006-01-02T15:04:05.999999999Z07:00",
"2006-01-02T15:04:05+0000",
"2020-08-17T05:50:22.895Z",
"2006-01-02 15:04:05.999999-07",
"2006-01-02 15:04:05.999999+00",
}
View Source
var (
ErrNullValue = fmt.Errorf("null value")
)
View Source
var GeospatialTypes = []string{"geometry", "point", "polygon", "linestring", "multi"}
Functions ¶
func ExtractAndMapColumnType ¶
func FormatCursorValue ¶ added in v0.3.5
FormatCursorValue is used to make time format and object id format consistent to be saved in state
func ReformatBool ¶ added in v0.2.0
func ReformatFloat32 ¶
func ReformatFloat64 ¶
func ReformatGeoType ¶ added in v0.2.9
func ReformatInt32 ¶
func ReformatInt64 ¶
func TypeFromValue ¶
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field is a data type holder with occurrences
type Fields ¶
func (Fields) FromSchema ¶
func (f Fields) FromSchema(schema *types.TypeSchema)
func (Fields) OverrideTypes ¶
OverrideTypes check if field exists in other then put its type
func (Fields) ToTypeSchema ¶
func (f Fields) ToTypeSchema() *types.TypeSchema
type Flattener ¶
func NewFlattener ¶
func NewFlattener() Flattener
type FlattenerImpl ¶
type FlattenerImpl struct {
// contains filtered or unexported fields
}
type StringInterface ¶
type StringInterface interface {
String() string
}
type Time ¶
func (Time) Compare ¶ added in v0.1.3
Compare compares the time instant ct with u. If ct is before u, it returns -1; if ct is after u, it returns +1; if they're the same, it returns 0.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON overrides the default unmarshalling for CustomTime
Click to show internal directories.
Click to hide internal directories.