Skip to content

Commit 309c979

Browse files
committed
PR review comment changes and JFrog project change/fix
1 parent 3d042fb commit 309c979

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/actions/run-ee-server/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ runs:
4646
uses: jfrog/setup-jfrog-cli@v4
4747
env:
4848
JF_URL: ${{ inputs.jfrog-platform-url }}
49-
JF_PROJECT: clients
49+
JF_PROJECT: database
5050
with:
5151
oidc-provider-name: ${{ inputs.oidc-provider }}
5252
oidc-audience: ${{ inputs.oidc-audience }}

cdt_context.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@ const (
3838
// An array of CTX identifies location of the list/map on multiple
3939
// levels on nesting.
4040
type CDTContext struct {
41-
Id int
42-
Value Value
41+
Id int
42+
// Value is the value of the context.
43+
// It can be a literal value or a computed value.
44+
// Either Value or Expression must be set.
45+
Value Value
46+
// Expression is the expression of the context.
47+
// It can be a filter expression or a computed expression.
48+
// Either Value or Expression must be set.
4349
Expression *Expression
4450
}
4551

cdt_list.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,11 @@ func packCDTIfcVarParamsAsArray(packer BufferEx, opType int16, ctx []*CDTContext
296296
}
297297
size += n
298298

299-
if c.Value != nil {
299+
if c.Value != nil && c.Expression != nil {
300+
return size, newError(types.PARAMETER_ERROR, "CDTContext must have either a Value or an Expression but not both")
301+
} else if c.Value == nil && c.Expression == nil {
302+
return size, newError(types.PARAMETER_ERROR, "CDTContext must have either a Value or an Expression")
303+
} else if c.Value != nil {
300304
if n, err = c.Value.pack(packer); err != nil {
301305
return size + n, err
302306
}
@@ -306,8 +310,6 @@ func packCDTIfcVarParamsAsArray(packer BufferEx, opType int16, ctx []*CDTContext
306310
return size + n, err
307311
}
308312
size += n
309-
} else {
310-
return size, newError(types.PARAMETER_ERROR, "CDTContext must have either a Value or an Expression")
311313
}
312314
}
313315

@@ -385,7 +387,7 @@ func packCDTCreate(packer BufferEx, opType int16, ctx []*CDTContext, flag int, p
385387
return size + n, err
386388
}
387389
size += n
388-
} else if c.Expression != nil{
390+
} else if c.Expression != nil {
389391
if n, err = c.Expression.pack(packer); err != nil {
390392
return size + n, err
391393
}

0 commit comments

Comments
 (0)