Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
BaseModel
ArtifactKey
DatasetUUID string `gorm:"type:uuid;index:artifacts_dataset_uuid_idx"`
Dataset Dataset `gorm:"association_autocreate:false"`
ArtifactData []ArtifactData `` /* 174-byte string literal not displayed */
Partitions []Partition `gorm:"association_foreignkey:ArtifactID;foreignkey:ArtifactID"`
Tags []Tag `gorm:"association_foreignkey:ArtifactID,DatasetUUID;foreignkey:ArtifactID,DatasetUUID"`
SerializedMetadata []byte
}
type ArtifactData ¶
type ArtifactData struct {
BaseModel
ArtifactKey
Name string `gorm:"primary_key"`
Location string
}
type ArtifactKey ¶
type DBQueryExpr ¶ added in v0.1.2
type DBQueryExpr struct {
Query string
Args interface{}
}
Encapsulates the query and necessary arguments to issue a DB query.
type Dataset ¶
type Dataset struct {
BaseModel
DatasetKey
SerializedMetadata []byte
PartitionKeys []PartitionKey `gorm:"association_foreignkey:UUID;foreignkey:DatasetUUID"`
}
type DatasetKey ¶
type DatasetKey struct {
Project string `gorm:"primary_key;"` // part of pkey, no index needed as it is first column in the pkey
Name string `gorm:"primary_key;index:dataset_name_idx"` // part of pkey and has separate index for filtering
Domain string `gorm:"primary_key;index:dataset_domain_idx"` // part of pkey and has separate index for filtering
Version string `gorm:"primary_key;index:dataset_version_idx"` // part of pkey and has separate index for filtering
UUID string `gorm:"type:uuid;unique;default:uuid_generate_v4()"`
}
type ListModelsInput ¶ added in v0.1.2
type ListModelsInput struct {
// The filters for the list
ModelFilters []ModelFilter
// The number of models to list
Limit uint32
// The token to offset results by
Offset uint32
// Parameter to sort by
SortParameter SortParameter
}
Inputs to specify to list models
type ModelFilter ¶ added in v0.1.2
type ModelFilter struct {
ValueFilters []ModelValueFilter
JoinCondition ModelJoinCondition
Entity common.Entity
}
A single filter for a model encompasses value filters and optionally a join condition if the filter is not on the source model
type ModelJoinCondition ¶ added in v0.1.2
type ModelJoinCondition interface {
GetJoinOnDBQueryExpression(sourceTableName string, joiningTableName string, joiningTableAlias string) (string, error)
}
Generates the join expressions for filters that require other entities
type ModelValueFilter ¶ added in v0.1.2
type ModelValueFilter interface {
GetDBQueryExpression(tableName string) (DBQueryExpr, error)
}
Generates db filter expressions for model values
type Partition ¶ added in v0.1.2
type Partition struct {
BaseModel
DatasetUUID string `gorm:"primary_key;type:uuid"`
Key string `gorm:"primary_key"`
Value string `gorm:"primary_key"`
ArtifactID string `gorm:"primary_key;index"` // index for JOINs with the Tag/Labels table when querying artifacts
}
Main Use cases: 1. Filter artifacts by partition key/val in a dataset from UI [x] 2. Get the artifact that has the partitions (x,y,z + tag_name) = latest [x]
type PartitionKey ¶ added in v0.1.2
type SortParameter ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.