Documentation
¶
Index ¶
Constants ¶
const ( Postgres string = "postgres" SQLite string = "sqlite" SQLiteMemory string = "sqlite_memory" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Edge ¶
type Edge struct { ID uint64 `gorm:"primaryKey;column:edge_id"` CreatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:created_at"` UpdatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:updated_at"` Type string `gorm:"column:etype"` Content datatypes.JSON FromEntityID uint64 `gorm:"column:from_entity_id"` ToEntityID uint64 `gorm:"column:to_entity_id"` FromEntity Entity ToEntity Entity }
Edge represents a relationship between two entities stored in the database.
type EdgeTag ¶
type EdgeTag struct { ID uint64 `gorm:"primaryKey;column:tag_id"` CreatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:created_at"` UpdatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:updated_at"` Type string `gorm:"column:ttype"` Content datatypes.JSON EdgeID uint64 `gorm:"column:edge_id"` }
EdgeTag represents additional metadata added to an edge in the asset database.
func (*EdgeTag) NameJSONQuery ¶ added in v0.15.0
func (e *EdgeTag) NameJSONQuery() (*datatypes.JSONQueryExpression, error)
NameJSONQuery generates the JSON query for the field returned by the Property Name method. It returns the parsed property and an error, if any.
func (*EdgeTag) Parse ¶
Parse parses the content of the edge tag into the corresponding Open Asset Model (OAM) property type. It returns the parsed property and an error, if any.
func (*EdgeTag) ValueJSONQuery ¶ added in v0.15.0
func (e *EdgeTag) ValueJSONQuery() (*datatypes.JSONQueryExpression, error)
ValueJSONQuery generates the JSON query for the field returned by the Property Value method. It returns the parsed property and an error, if any.
type Entity ¶
type Entity struct { ID uint64 `gorm:"primaryKey;column:entity_id"` CreatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:created_at"` UpdatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:updated_at"` Type string `gorm:"column:etype"` Content datatypes.JSON }
Entity represents an entity stored in the database.
type EntityTag ¶
type EntityTag struct { ID uint64 `gorm:"primaryKey;column:tag_id"` CreatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:created_at"` UpdatedAt time.Time `gorm:"type:datetime;default:CURRENT_TIMESTAMP();column:updated_at"` Type string `gorm:"column:ttype"` Content datatypes.JSON EntityID uint64 `gorm:"column:entity_id"` }
EntityTag represents additional metadata added to an entity in the asset database.
func (*EntityTag) NameJSONQuery ¶ added in v0.15.0
func (e *EntityTag) NameJSONQuery() (*datatypes.JSONQueryExpression, error)
NameJSONQuery generates the JSON query for the field returned by the Property Name method. It returns the parsed property and an error, if any.
func (*EntityTag) Parse ¶
Parse parses the content of the entity tag into the corresponding Open Asset Model (OAM) property type. It returns the parsed property and an error, if any.
func (*EntityTag) ValueJSONQuery ¶ added in v0.15.0
func (e *EntityTag) ValueJSONQuery() (*datatypes.JSONQueryExpression, error)
ValueJSONQuery generates the JSON query for the field returned by the Property Value method. It returns the parsed property and an error, if any.