Documentation ¶
Index ¶
- Constants
- func Prepare(entity Entity)
- func String(value string) *string
- func StringValue(value *string) string
- type Entity
- type PropertyList
- func (list *PropertyList) Append(prop datastore.Property)
- func (list *PropertyList) Load(properties []datastore.Property) error
- func (list *PropertyList) LoadFromStruct(input interface{}, names ...string) error
- func (list *PropertyList) LoadStruct(input interface{}) error
- func (list *PropertyList) Save() ([]datastore.Property, error)
- type UniqueConstraint
Constants ¶
const PrimaryKey = "__key__"
PrimaryKey is the primary key name
Variables ¶
This section is empty.
Functions ¶
func StringValue ¶
StringValue returns the string's value from pointer
Types ¶
type PropertyList ¶
PropertyList converts a []Property to implement PropertyLoadSaver.
func (*PropertyList) Append ¶
func (list *PropertyList) Append(prop datastore.Property)
Append inserts a property to *list
func (*PropertyList) Load ¶
func (list *PropertyList) Load(properties []datastore.Property) error
Load loads all of the provided properties into list. It does not first reset *list to an empty slice.
func (*PropertyList) LoadFromStruct ¶
func (list *PropertyList) LoadFromStruct(input interface{}, names ...string) error
LoadFromStruct loads all of the struct's properties into l. It does not first reset *l to an empty slice.
func (*PropertyList) LoadStruct ¶
func (list *PropertyList) LoadStruct(input interface{}) error
LoadStruct loads the properties from *list to dst. dst must be a struct pointer.
The values of dst's unmatched struct fields are not modified, and matching slice-typed fields are not reset before appending to them. In particular, it is recommended to pass a pointer to a zero valued struct on each LoadStruct call.
type UniqueConstraint ¶
UniqueConstraint represents a unique constraint in datastore
func (*UniqueConstraint) Check ¶
func (u *UniqueConstraint) Check(tx *datastore.Transaction, input Entity) error
Check the unique contrants