Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5581,6 +5581,21 @@ paths:
name: tokenindex
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: tx.id
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: tx.type
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: type
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: uri
Expand Down Expand Up @@ -6954,6 +6969,21 @@ paths:
name: tokenindex
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: tx.id
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: tx.type
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: type
schema:
type: string
- description: 'Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^'
in: query
name: uri
Expand Down
14 changes: 7 additions & 7 deletions internal/database/sqlcommon/batch_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Kaleido, Inc.
// Copyright © 2022 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -45,12 +45,12 @@ var (
"node_id",
}
batchFilterFieldMap = map[string]string{
"type": "btype",
"payloadref": "payload_ref",
"transaction.type": "tx_type",
"transaction.id": "tx_id",
"group": "group_hash",
"node": "node_id",
"type": "btype",
"payloadref": "payload_ref",
"tx.type": "tx_type",
"tx.id": "tx_id",
"group": "group_hash",
"node": "node_id",
}
)

Expand Down
22 changes: 11 additions & 11 deletions internal/database/sqlcommon/tokentransfer_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Kaleido, Inc.
// Copyright © 2022 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -48,16 +48,16 @@ var (
"created",
}
tokenTransferFilterFieldMap = map[string]string{
"localid": "local_id",
"pool": "pool_id",
"tokenindex": "token_index",
"from": "from_key",
"to": "to_key",
"protocolid": "protocol_id",
"message": "message_id",
"messagehash": "message_hash",
"transaction.type": "tx_type",
"transaction.id": "tx_id",
"localid": "local_id",
"pool": "pool_id",
"tokenindex": "token_index",
"from": "from_key",
"to": "to_key",
"protocolid": "protocol_id",
"message": "message_id",
"messagehash": "message_hash",
"tx.type": "tx_type",
"tx.id": "tx_id",
}
)

Expand Down
5 changes: 4 additions & 1 deletion pkg/database/plugin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Kaleido, Inc.
// Copyright © 2022 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -808,6 +808,7 @@ var TokenBalanceQueryFactory = &queryFields{

// TokenTransferQueryFactory filter fields for token transfers
var TokenTransferQueryFactory = &queryFields{
"type": &StringField{},
"localid": &StringField{},
"pool": &UUIDField{},
"tokenindex": &StringField{},
Expand All @@ -822,4 +823,6 @@ var TokenTransferQueryFactory = &queryFields{
"message": &UUIDField{},
"messagehash": &Bytes32Field{},
"created": &TimeField{},
"tx.type": &StringField{},
"tx.id": &UUIDField{},
}