Documentation ¶
Index ¶
- Variables
- func IsLocation(value reflect.Value) bool
- func IsRegion(value reflect.Value) bool
- func IsTimestamp(value reflect.Value) bool
- func ParseObject(target interface{}, schema Schema) ([]map[string]interface{}, error)
- func ParseSingleObject(target interface{}, schema Schema) (map[string]interface{}, error)
- func ParseType(target interface{}) (string, error)
- type DataType
- type Field
- type Location
- func (l *Location) IsEqual(other Location) bool
- func (l Location) IsLocation() bool
- func (l Location) IsRegion() bool
- func (l *Location) Lat() float64
- func (l *Location) Lon() float64
- func (l *Location) Scan(value interface{}) error
- func (l Location) String() string
- func (l Location) Value() (driver.Value, error)
- type Region
- type Schema
- type SpatialObject
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedDataType = errors.New("unsupported data type")
Functions ¶
func IsLocation ¶
func IsTimestamp ¶
func ParseObject ¶
func ParseSingleObject ¶
Types ¶
type Field ¶
type Field struct { Name string DBName string FieldType reflect.Type IndirectFieldType reflect.Type DataType DataType StructField reflect.StructField Tag reflect.StructTag TagSettings map[string]string PrimaryKey bool AutoIncrement bool NotNull bool Unique bool HasDefaultValue bool DefaultValue interface{} Schema *Schema }
func (Field) GetFullDBName ¶
func (Field) GetFullName ¶
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
func NewLocation ¶
func (Location) IsLocation ¶
type Region ¶
type Region struct {
// contains filtered or unexported fields
}
func NewRectRegion ¶
Convenience functions for Region construction
func (Region) IsLocation ¶
type Schema ¶
type Schema struct { Name string ModelType reflect.Type Table string DBNames []string PrimaryFields []*Field Fields []*Field FieldsByName map[string]*Field FieldsByDBName map[string]*Field AllFieldNames *utils.Set PrimaryFieldNames *utils.Set // Used for convenience LocationFieldNames *utils.Set RegionFieldNames *utils.Set }
func (*Schema) ParseField ¶
func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field
func (Schema) SetDefaultValues ¶
type SpatialObject ¶
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
func NewTimestamp ¶
Click to show internal directories.
Click to hide internal directories.