Discover Packages
github.com/npiganeau/yep
yep
models
types
package
Version:
v0.0.0-...-2b35e24
Opens a new window with list of versions in this module.
Published: Jul 21, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
Documentation
¶
A Context is a map of objects that is passed along from function to function
during a transaction. A Context is read only.
NewContext returns a new Context instance
Copy returns a shallow copy of the Context
Get returns the value of this Context for the given key
HasKey returns true if this Context has the given key
IsEmpty returns true if this Context has no entries.
ToMap returns a copy of the map of values of this context
WithKey returns a copy of this context with the given key/value.
If key already exists, it is overwritten.
Date type that JSON marshal and unmarshals as "YYYY-MM-DD"
Today returns the current date
IsNull returns true if the Date is the zero value
MarshalJSON for Date type
Value formats our Date for storing in database
Especially handles empty Date.
DateTime type that JSON marshals and unmarshals as "YYYY-MM-DD HH:MM:SS"
Now returns the current date/time
IsNull returns true if the DateTime is the zero value
MarshalJSON for DateTime type
Value formats our DateTime for storing in database
Especially handles empty DateTime.
type Digits struct {
Precision int8
Scale int8
}
Digits holds precision and scale information for a float (numeric) type:
- The precision: the total number of digits
- The scale: the number of digits to the right of the decimal point
(PostgresSQL definitions)
A Selection is a set of possible (key, label) values for a model
"selection" field.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.