@@ -22,13 +22,13 @@ func (w *standardWriterImpl) CreateArtifact(
22
22
description string ,
23
23
spec * Spec ,
24
24
db database.Database ,
25
- ) (* Artifact , error ) {
25
+ ) (* DBArtifact , error ) {
26
26
insertColumns := []string {NameColumn , DescriptionColumn , SpecColumn }
27
27
insertArtifactStmt := db .PrepareInsertWithReturnAllStmt (tableName , insertColumns , allColumns ())
28
28
29
29
args := []interface {}{name , description , spec }
30
30
31
- var artifact Artifact
31
+ var artifact DBArtifact
32
32
err := db .Query (ctx , & artifact , insertArtifactStmt , args ... )
33
33
return & artifact , err
34
34
}
@@ -41,7 +41,7 @@ func (r *standardReaderImpl) GetArtifact(
41
41
ctx context.Context ,
42
42
id uuid.UUID ,
43
43
db database.Database ,
44
- ) (* Artifact , error ) {
44
+ ) (* DBArtifact , error ) {
45
45
artifacts , err := r .GetArtifacts (ctx , []uuid.UUID {id }, db )
46
46
if err != nil {
47
47
return nil , err
@@ -58,7 +58,7 @@ func (r *standardReaderImpl) GetArtifacts(
58
58
ctx context.Context ,
59
59
ids []uuid.UUID ,
60
60
db database.Database ,
61
- ) ([]Artifact , error ) {
61
+ ) ([]DBArtifact , error ) {
62
62
if len (ids ) == 0 {
63
63
return nil , errors .New ("Provided empty IDs list." )
64
64
}
@@ -71,7 +71,7 @@ func (r *standardReaderImpl) GetArtifacts(
71
71
72
72
args := stmt_preparers .CastIdsListToInterfaceList (ids )
73
73
74
- var artifacts []Artifact
74
+ var artifacts []DBArtifact
75
75
err := db .Query (ctx , & artifacts , getArtifactsQuery , args ... )
76
76
return artifacts , err
77
77
}
@@ -80,7 +80,7 @@ func (r *standardReaderImpl) GetArtifactsByWorkflowDagId(
80
80
ctx context.Context ,
81
81
workflowDagId uuid.UUID ,
82
82
db database.Database ,
83
- ) ([]Artifact , error ) {
83
+ ) ([]DBArtifact , error ) {
84
84
getArtifactsByWorkflowDagIdQuery := fmt .Sprintf (
85
85
`SELECT %s FROM artifact WHERE id IN
86
86
(SELECT from_id FROM workflow_dag_edge WHERE workflow_dag_id = $1 AND type = '%s'
@@ -91,7 +91,7 @@ func (r *standardReaderImpl) GetArtifactsByWorkflowDagId(
91
91
workflow_dag_edge .OperatorToArtifactType ,
92
92
)
93
93
94
- var artifacts []Artifact
94
+ var artifacts []DBArtifact
95
95
err := db .Query (ctx , & artifacts , getArtifactsByWorkflowDagIdQuery , workflowDagId )
96
96
return artifacts , err
97
97
}
@@ -101,8 +101,8 @@ func (w *standardWriterImpl) UpdateArtifact(
101
101
id uuid.UUID ,
102
102
changes map [string ]interface {},
103
103
db database.Database ,
104
- ) (* Artifact , error ) {
105
- var artifact Artifact
104
+ ) (* DBArtifact , error ) {
105
+ var artifact DBArtifact
106
106
err := utils .UpdateRecordToDest (ctx , & artifact , changes , tableName , IdColumn , id , allColumns (), db )
107
107
return & artifact , err
108
108
}
0 commit comments