Documentation ¶
Index ¶
- func DbDecode(property *model.ResourceProperty, val interface{}) (interface{}, errors.ServiceError)
- func NewSqlBackend(dataSource abs.DataSource, options SqlBackendOptions) abs.Backend
- type CustomType
- func (u CustomType) Default() any
- func (u CustomType) Equals(a, b interface{}) bool
- func (u CustomType) IsEmpty(value any) bool
- func (u CustomType) Pack(val interface{}) (*structpb.Value, error)
- func (u CustomType) Pointer(required bool) any
- func (u CustomType) String(val any) string
- func (u CustomType) UnPack(val *structpb.Value) (interface{}, error)
- type SqlBackendOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DbDecode ¶
func DbDecode(property *model.ResourceProperty, val interface{}) (interface{}, errors.ServiceError)
func NewSqlBackend ¶
func NewSqlBackend(dataSource abs.DataSource, options SqlBackendOptions) abs.Backend
Types ¶
type CustomType ¶
type CustomType struct { CustomEquals func(a, b interface{}) bool CustomPack func(value interface{}) (*structpb.Value, error) CustomUnPack func(val *structpb.Value) (interface{}, error) CustomDefault func() any CustomPointer func(required bool) any CustomString func(val any) string CustomIsEmpty func(value any) bool }
func CustomTypeFromType ¶
func CustomTypeFromType(typ types.PropertyType, override CustomType) CustomType
func (CustomType) Default ¶
func (u CustomType) Default() any
func (CustomType) Equals ¶
func (u CustomType) Equals(a, b interface{}) bool
func (CustomType) IsEmpty ¶
func (u CustomType) IsEmpty(value any) bool
func (CustomType) Pointer ¶
func (u CustomType) Pointer(required bool) any
func (CustomType) String ¶
func (u CustomType) String(val any) string
type SqlBackendOptions ¶
type SqlBackendOptions interface { UseDbHandleError(func(ctx context.Context, err error) errors.ServiceError) GetConnectionString() string GetSql(s string) string GetDriverName() string HandleError(err error) (errors.ServiceError, bool) GetSqlTypeFromProperty(propertyType model.ResourceProperty_Type, length uint32) string GetPropertyTypeFromPsql(columnType string) model.ResourceProperty_Type Quote(str string) string GetFlavor() sqlbuilder.Flavor GetDefaultCatalog() string GetResourceMigrationBuilderConstructor() helper.ResourceMigrationBuilderConstructor GetFullTableName(config *model.ResourceSourceConfig) string DbEncode(property *model.ResourceProperty, packedVal *structpb.Value) (interface{}, errors.ServiceError) TypeModifier(propertyType model.ResourceProperty_Type) types.PropertyType }
Source Files ¶
- custom.go
- sql-backend-connection.go
- sql-backend-constructor.go
- sql-backend-generic.go
- sql-backend-helper.go
- sql-backend-record-service.go
- sql-backend-resource-migration.go
- sql-backend-schema-service.go
- sql-backend-transaction-service.go
- sql-builder-record-list.go
- sql-builder-records.go
- sql-builder-resources.go
- with-backend.go
Click to show internal directories.
Click to hide internal directories.