Documentation ¶
Index ¶
- func AddMapper(mapper *PropertyMapper)
- func AddMappers(mappers ...*PropertyMapper)
- type PropertyDict
- type PropertyMapper
- type PropertyMapperValue
- type PropertyMappers
- func (p *PropertyMappers) AddMapper(m *PropertyMapper)
- func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
- func (p *PropertyMappers) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
- func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMapper ¶
func AddMapper(mapper *PropertyMapper)
Add a PropertyMapper to global PropertyMappers.
func AddMappers ¶
func AddMappers(mappers ...*PropertyMapper)
Add some PropertyMapper to global PropertyMappers.
Types ¶
type PropertyDict ¶ added in v1.3.7
type PropertyDict map[string]*PropertyMapperValue
PropertyDict represents a dictionary of property mapping.
func (PropertyDict) ApplyCypherOrderBy ¶ added in v1.3.7
func (p PropertyDict) ApplyCypherOrderBy(parent, source string) string
Apply orderBy (cypher version) string through PropertyDict.
func (PropertyDict) ApplyOrderBy ¶ added in v1.3.7
func (p PropertyDict) ApplyOrderBy(source string) string
Apply orderBy string through PropertyDict.
type PropertyMapper ¶
type PropertyMapper struct {
// contains filtered or unexported fields
}
A set of properties mapper.
func GetDefaultMapper ¶ added in v1.3.7
func GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
Get a default PropertyMapper from global PropertyMappers.
func GetMapper ¶
func GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
Get a PropertyMapper from global PropertyMappers.
func NewMapper ¶
func NewMapper(from interface{}, to interface{}, dict PropertyDict) *PropertyMapper
Create a PropertyMapper.
func (*PropertyMapper) ApplyCypherOrderBy ¶ added in v1.3.6
func (p *PropertyMapper) ApplyCypherOrderBy(parent, source string) string
Apply orderBy (cypher version) string through PropertyMapper.
func (*PropertyMapper) ApplyOrderBy ¶
func (p *PropertyMapper) ApplyOrderBy(source string) string
Apply orderBy string through PropertyMapper.
type PropertyMapperValue ¶
type PropertyMapperValue struct {
// contains filtered or unexported fields
}
A property mapper.
func NewValue ¶
func NewValue(revert bool, destProps ...string) *PropertyMapperValue
Create a PropertyMapperValue.
type PropertyMappers ¶
type PropertyMappers struct {
// contains filtered or unexported fields
}
A mappers container.
func (*PropertyMappers) AddMapper ¶
func (p *PropertyMappers) AddMapper(m *PropertyMapper)
Add a PropertyMapper to PropertyMappers.
func (*PropertyMappers) AddMappers ¶
func (p *PropertyMappers) AddMappers(mappers ...*PropertyMapper)
Add some PropertyMapper to PropertyMappers.
func (*PropertyMappers) GetDefaultMapper ¶ added in v1.3.7
func (p *PropertyMappers) GetDefaultMapper(from interface{}, to interface{}) *PropertyMapper
Get a default PropertyMapper from PropertyMappers.
func (*PropertyMappers) GetMapper ¶
func (p *PropertyMappers) GetMapper(from interface{}, to interface{}) (*PropertyMapper, error)
Get a PropertyMapper from PropertyMappers.