From dd7b55c7e503f78014aeab7372a74529d745bfad Mon Sep 17 00:00:00 2001 From: polebug Date: Tue, 24 Dec 2024 23:35:35 +0800 Subject: [PATCH 1/2] feat(core): support for querying metadata sql --- docs/generated.go | 358 +++++++++--------- ...tchGetDecentralizedMetadataActivities.yaml | 7 +- .../dialer/postgres/client_partitioned.go | 27 +- internal/database/model/activity.go | 25 +- .../decentralized/handler_metadata.go | 32 +- 5 files changed, 209 insertions(+), 240 deletions(-) diff --git a/docs/generated.go b/docs/generated.go index dda0002c..fb55d505 100644 --- a/docs/generated.go +++ b/docs/generated.go @@ -19,7 +19,6 @@ import ( "github.com/rss3-network/node/schema/worker/federated" "github.com/rss3-network/protocol-go/schema" activityx "github.com/rss3-network/protocol-go/schema/activity" - "github.com/rss3-network/protocol-go/schema/metadata" "github.com/rss3-network/protocol-go/schema/network" "github.com/rss3-network/protocol-go/schema/tag" ) @@ -71,10 +70,12 @@ type PostDecentralizedMetadataJSONBody struct { Cursor *string `json:"cursor,omitempty"` // Limit Specify the number of activities to retrieve - Limit *int `default:"100" json:"limit,omitempty" validate:"min=1,max=100"` - Metadata *metadata.Metadata `json:"metadata,omitempty" validate:"required"` - Network *network.Network `json:"network,omitempty" validate:"required"` - Platform *decentralized.Platform `json:"platform,omitempty"` + Limit *int `default:"100" json:"limit,omitempty" validate:"min=1,max=100"` + + // MetadataQueryWhere SQL WHERE clause for metadata filtering (e.g. actions::jsonb @> '[{"metadata": {"from": {"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}, "to": {"address": "0xB3912b20b3aBc78C15e85E13EC0bF334fbB924f7"}}}]') + MetadataQueryWhere *string `json:"metadata_query_where,omitempty" validate:"required"` + Network *network.Network `json:"network,omitempty" validate:"required"` + Platform *decentralized.Platform `json:"platform,omitempty"` // SinceTimestamp The timestamp of when the activity occurred. SinceTimestamp *uint64 `json:"since_timestamp,omitempty"` @@ -783,178 +784,181 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9aW/jOBLoXxG0D5hdwHHk2w4w2MnRvdN43T15cWYGu72BQUu0zY0kakgqjqeR//7A", - "S6Ik2rEc231Muj/EtijWwWKxWKwqfnZ9HCU4hjGj7tlnNwEERJBBUvo2SQBbTIDv4zRmkwD6MGYEhOhP", - "GPCGAaQ+QQlDOHbP3BvICIIP0AE+Qw+IIUidGcGRwxbQoQn00QzBwFG9Nd2GCx9BlITQPXO9x2AYgP50", - "1u6P+l0wGwUDCIMR9Dqw1+m2ekFnAMCo73V7bsNFHBrHzG24MYj4+6pTt+ES+EeKCMePkRQ2XOovYAQ4", - "tv+HwJl75v7tNKf9VD7N/k6uTBLPVadPT421PJnBABLA9soPMQjv03tA//wZExxA/x7xnx5AmHJifyo9", - "+ynBYZNiH4HQfWq4FAJ/EYBoUXgn+/Wnlsf/N5NQEHZAZr7VvNnMSMGc1QRtYmEAGUAhdWaYVNgn33fe", - "XZUkatj1YLcd9AYdOIWt2aw9ACPYHbW6vUFn2oVerzWc+UF/2PMHs1Gn0wo6rRGYwmGvOxsMPdixSxoK", - "NvKFrRLeijKC4rmV4BiyJSb3O8uLer84fyBbQALTyI6zBvnSAb0mmGEfhx9VfzbykhCwGSbRnrSF7q5p", - "p0w/3u/Ev9a9biTw5VP/WMRlE3EjYYTSnWbgzXjsKMRzgQRTfw1R8tuOM+iPFJKV0Bk4noQoQqyK8lhg", - "thJYxmk0hcTBM0e+Q50lYgsUi4eZ6mDYIYrO4rRqeZoIAdhUkQYGdYfjXLz8Xrz71HAfTzBI0ImPAziH", - "8Ql8ZAScMDBXozEDacg0LhKNCvwHEKIAMI5ZhOIfW40IPP7Y9jZyLwFzuJl5CZijGPAHYtQVB00GtTZy", - "R0DYjTnX/NUavKmyRgEvc8bOEj8lFJPN3JBtnJTCQLAj505zjZCoXuty4FK+9hz1ml4FxUpXgAj0JS3b", - "qKgp4MTh2MneW0da3v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LNH9bcl3B/sgybeXeVyPP7/haGoNQLgtHW2zOYwcpyA6F5AESB/K2Dvb9lBAY", - "OMsFCqGTEMzx5usry0kq0aCsxEscz9B8p9GtYYtKKFfCmfACvn/EAXwXz/Dh0FUA9oApe4vTODiuJZKb", - "7QRSnBIfCixjzJwZx6aE5M14vJNCzmI69Jz+9NnV0Uz8M99GuGfucrlsgqnfjCFrgtQtuaRStsBEtlcH", - "Pm+iCDi/r+JYugCK5P039byOH6AH8QHKr4u2/PYudugCE3Ymfz7Vv8uvifzyEfkLGCJhdvopZTiCxLlE", - "cbBybpC/ACSgOHYoWFGHLsTGGz9AslzAkNtzS8QWjo8pow0HxX6YBrwfAmPWcCJM2BzModi1c61FnSCF", - "8qQLOiGO504AQ94xH9gQivPpBSTOAqcUNhXSiQXn8QI6C0AdMQow4F0CebzLX6dpAgmI41QGleHYEVQs", - "UOLMCR9v6kxTKagEcqUHAyswza7fF4D9QJ0YPrJ/buLk7+fOJY4iyOXrA4oRZZA44xQ6b8IQkhVnHYod", - "BsJ7GR8o471wlIB45YApTpmQz/BBayjBIs0bHGtuRby9HirqAL64Ax/FcysVp7lwxHypT6cT5RRqe+3u", - "iTc48dq3Xves1TnrDJue5/3HbbgMMRGcJOVATukkwVTyesotAYElih3gxHDpLHAEnenKifGy6byLKYMg", - "4PLyA1W4OVMQ35M0Yf6quAF3b8bjn9Op2NGEfGmbpCTkE8BdMJbQs9PT4oQ5jeGSnua4n8a5AJ9wNE6m", - "KQq5GJ5Ifp34IKXioZKC05bX9bqDYcsTxgHfxLpEHPozbJufaoGcQRjIGZj7PFycMrexdmajwD07BhkN", - "F8UBfHTPPMMrwmlaCMbiZcz3uFX8sq3/DIQUlniRb4Jbg9ZoOOq1h6O1LOImxSRTdq0y054az5o/B7E2", - "c1X+bdmZv2NyD8nOa/ruBualfsRh78E8zAZeYHIzHndOlO2T+XJO/oUnBM7oZAFBQCcRQPEEJzAGCZp8", - "gAGyOV2DgCiXVcn303AjFMEstKQa5V0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ECMtYFPz7iVPT1SwLj", - "sejml7z8zTUgYE5AslCf1enMNQ5XESD3oszXzXjM18EbgOKpoHF8/tsH/ocBMpeFYX6NkXpTOsP+A4n1", - "fKlYSqSwoW9mo7JTZZEYB1CXFJG78tOiS+FpnTT8rnwTxrmBqkxkjrxRu0iXKoJxEAAscjHFQPiyIJch", - "ANr5JQdzYQw6+mMpB/0eLRFVgx7KdqEcdF2+SPwl4sgM31MiBz3KBj1zUUU4wvdAFTnKyr3EavS1VOME", - "xlT0axZBMqQgyaUgMaWAZMPP+Z6XSaK5FKSZFEgf5p87SIEajQPJQI07ZfWVWnEgHknXiV3nQdXGUcl4", - "4qonX7zgBMLZQvXqJdGqbqP5NqA9CRAF0xAGux05NEQv4mAKErprHyqedr8nHtldeJU76+QddfrOlypj", - "fBzANVwXb/Ln9oUkgpRmp0v2l1WTmicNlTur6xktecWlnygE/iIA0eKnlsf/N5Nwk1OncO/h1+DQsd3e", - "XdeZk/XxEm+O9Tbpr8OT84Jr9xuGj0R7++W9zvjl96sfskbvlrMndwV94d1neWL9BXeeNkF52a7zufly", - "0E3obrMu346aMy87VBNzL9un7srVvei2F19XfxC1dKTtqVWpfSVb0xcrzlLphVyq9YxR81owTA5ndvJV", - "ZELDzT9peTEH6W4bLW3e87abzOTreuXe1vMgQNL+drTZsH4hNo8LjBzCzIOemVCnKYWEnmbGlauzCt0x", - "jqDD4CPfz+icpHVWWDk7r9Xq9Hpeq9dt91ter9Xqevkp90/v03tA//wZExxA/x79lOCwmR/P53lxVsTz", - "xgrzUm/P4b8BuJ2M7qjf8TqD3tAbjQYGGX9LfLfh/g1P0wAv5V2OphO60+63R8PesJR7tzUdp/KYHNLT", - "ChJdtwqrMxj2WltZEpv9OR/ymIiL7Ur4Zuf7+/dJ5JEFO+xFM4KrLgsj8GNal8g9b7lfSCLcuK2ZQW4d", - "SNOC72jEff6btjNGFlp1RVAPua5ZLpAv7yIWIKiTAGQPhctrilk6FM+ywDpoD3/LTrfWRLnwh05CoI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vgSDzMRAcjIFF4FpdVy9VIiIFNEWlAUHc6TsXL78S7jw3n4YjAGB95", + "xEdzFB2hB5bAIwbnajZmMA2YhkWCURn/HgbYh4xDFuLo51YjhA8/t92N1IvhHG0mXgznOIL8gZh1RUGT", + "QK2N1BEj7EacK/5qDdpUSaMGL1PGThIvTShJNlNDtgEpRb4gR06d5homUb3WpcC5fO0p7DW+ahQrXj5O", + "kCdx2UZETSFHjkQge28dannHu+qQi6yHbRHNx7TiWlsaKKTXLv72usW/26qvv97NBb9xpfOmVprsydb4", + "O/3HOkbITYt61FAmBN169iO7zSHxPJDRsQFvQzfniGOGQvpMi6OhFSBMEsgHfDiakyP+2xG9w/EREbjA", + "4CgmOGIokQp0WyrGawyAEhn3Z9oclIQWu+Zrko/iyEMThkNEGQzj7WhHGUwYjuaaiJiCrId1lCsPVHfx", + "3WRvbot4eUQ7/qnnoY1GpE3XqLc4IVhK16Ks+q6L6li996g4QXU3FoM522KvO7FhzeB8y1VSsZwZnG9Y", + "H7zj2jPLId92UvkAdpTEEtoRp1WMNiHFu66N1SpG26N1ZEcqjRgO6q7ONOb2wXarsjzA4VdlecRHjjjf", + "WSHKzoiPpScp/2E1OYPMW/wLMZufi55mePPXPBIxFAmLCsZxgD1h6x7/j0prMsctTkiMEv2ach7R5+nD", + "zGO0szwv7xF32Jjlu4J6ZnvB6t7ZJq4FeQazYfHVNcMy5bYHnc+XyNc0hiyquPYSNNRZTU2jVEIdga1F", + "bkY1GAT/njknn+pxEJeUzmPjS04ow5Vyuzs9LcKzJj3zscn0f8hjUliV+UxIKjAl/kqolikXV3p7xo2k", + "kuoJ04DhOEAgkzplz1JBIK6Rf+8Rgz5k8FX+7Uf+7Sa5QjULSl0vFyix+af+7x34+Ovl9SXwAphSJNlA", + "vQpmOGCIMzv4O2rOm9pldXLCZ20Kfvmcum4HgZ8+ffmcjffZOQFfPjtcnqmP0PcTRCn/9tlxH87dNoSn", + "ndG03e68uRxeuKcu6p1337QH6PRi5A4754Ne/9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xQORP6FM8Ezb7bb6Q3do1hI0Mo6M0o2/j9+pLBWGSm+PhOZjKRVz", + "C30uFSWzfionYixFsTvnROUdya/Cj5UNe+QRVWKiAH671Rl2e4MKBr3RaNDtDDsmBnm6k4HAeZqotAcT", + "Bfn6qL0BBTNlZA02nurbxEcBcSSfVfDpjwbDYb+CTqs76HWGPRObPIvMwOY9FlVwy+jI1/sbsFEpMib0", + "oe7LBF+NeqQePt42HOOOWs1cOeCFcpRGMpoBs/FrEWq3Jrx5PybE+mfFQLcyKehkM6Qyb8gAMk+R2h5G", + "3okJoEqye3yslFvffFkyFw6FJkB2ad7UWqckZl5a0naQseHKYQ5I9vigQCR0p442y0hDRVUrZD5xNI/p", + "JA89yp5PCQmQqFG31lu/7mglvwiljqO+EJtmgNTQ97nKd4tm0+0mqjzrwn1ng1FnvUbPylKiOK1WyAXN", + "DhlDCW/mPnxyj0bwaHZ69Ob2S9d9rDHyumv3M2sDRgBHPr7HfgoDZUxqW3KzrbFFQOhTtwqapb/r3H+T", + "1SAt3WX0rEs+i/WXyyQ7zerx/nb9jgLVWFfzlnQryIGnSs1Uz1DndclwA+fbBc9ud7vjLncQbRI69htI", + "igaapUC8++AP/dP+2Zt2f9TvwjejiwG69EfI7Vz2Ot1W76IzgKejvtvtlYvH63Mnx30YjPrds/7pEF72", + "4KDVdUdocNkawN603e+PRm7ntD0YjQannmMWSWoNs2uUrwK4uiDCwMnrF+UZwrrSkHP17vQ/meThmyDr", + "vyp75eW9hY1HPRg1MTlmD8fuw7Drom7b7w06aIpas1l7AEeoO2p1e4POtIvcXms48/z+sOcNZqNOp+V3", + "WiM4RcNedzYYuqiTl/U2bTNVu9p9QLPz3mww8HqnF72Ls2Fv6rWHg8uh6w+9ztlw6HVm7UG/3z7PmZaZ", + "haw8Yw9T2m847kPXbbengx4qXY6mC4UjOekqOcPptHr90WjU63Xa7qjv5pPB5+KxkXPE2elZ12/N2oPp", + "6elg0G/Drj9st8+G7nm/O3gzaPVG7XZ31J7pou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bb8OzXcBf/mO4DyyZ/b27i", + "Vyvi1UX8up17dQ0/ZYsojqHHXpYHt9kSKV4sJ/MlpGA0XqBWYacrYKuUu+dNdaGa+DfpvaxMjJV0xtyI", + "XDQ5LTpdmj49ISItXmU9KTPRTn3io3+rbsVIdvp7JGJIpjox9MD4Lh9HWX4LVIk2HG2t6bGolZZnsag6", + "/D63KdyHT+7RCB7NTo/e3H7puo/2/K9ybXsbSt/01AqINXWBIu+meT3OLOkss2yLaS5kWW2cbW3YnSur", + "4ompFkVQZHnZ4/9RUp7wUorx2lQ4m9FUKE7Tanfb7qjdd4e2dDZRmyKNfV31eU1lClGUuJD8LQXeElKg", + "3i6U2uK/HIlax1skLFe58bQ4irZnfW30zdIgWH0P/JkhopliI4PqZLX9SZ8NUmd7rSq7+T4EvqB6lrO4", + "kdpyZdNJnvG7V3EgEzhpBstz5iBPnP6OZkECvXEyEkqPv/BNVB1/TNVzfT0eA96LdR6ux+Nnb/ESlfv8", + "nDnMq0v+JU1kPkem6+MKsoXBFHyW5MU4FCX3eppKV5CJe/V8dI8CEocoYkC2LWTinhwfi/v3FoSyk6G8", + "9UENspa1ZHicZC8yE6AWlanK+hU14xrbdlMMuLN2eFGJLNuu69w5Y+32jbG7e/x/AQAA///Ks1fDdicB", + "AA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml b/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml index 10610f71..37ceaa31 100644 --- a/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml +++ b/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml @@ -42,9 +42,8 @@ content: validate: "required" platform: $ref: "../schemas/DecentralizedPlatform.yaml" - metadata: - type: object - allOf: - - $ref: "../schemas/ProtocolMetadata.yaml" + metadata_query_where: + type: string + description: "SQL WHERE clause for metadata filtering (e.g. actions::jsonb @> '[{\"metadata\": {\"from\": {\"address\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\"}, \"to\": {\"address\": \"0xB3912b20b3aBc78C15e85E13EC0bF334fbB924f7\"}}}]')" x-oapi-codegen-extra-tags: validate: "required" diff --git a/internal/database/dialer/postgres/client_partitioned.go b/internal/database/dialer/postgres/client_partitioned.go index f8f724e7..6a4d4593 100644 --- a/internal/database/dialer/postgres/client_partitioned.go +++ b/internal/database/dialer/postgres/client_partitioned.go @@ -12,7 +12,6 @@ import ( "github.com/rss3-network/node/internal/database/dialer/postgres/table" "github.com/rss3-network/node/internal/database/model" activityx "github.com/rss3-network/protocol-go/schema/activity" - "github.com/rss3-network/protocol-go/schema/metadata" "github.com/rss3-network/protocol-go/schema/network" "github.com/samber/lo" "github.com/sourcegraph/conc/pool" @@ -1042,35 +1041,13 @@ func (c *client) buildFindActivitiesStatement(ctx context.Context, partitionedNa databaseStatement = databaseStatement.Where("timestamp < ? OR (timestamp = ? AND index < ?)", time.Unix(int64(query.Cursor.Timestamp), 0), time.Unix(int64(query.Cursor.Timestamp), 0), query.Cursor.Index) } - if query.Metadata != nil { - databaseStatement = c.buildFindActivitiesMetadataStatement(ctx, databaseStatement, lo.FromPtr(query.Metadata)) + if query.MetadataQuerySQL != nil { + databaseStatement = databaseStatement.Where(lo.FromPtr(query.MetadataQuerySQL)) } return databaseStatement.Order("timestamp DESC, index DESC").Limit(query.Limit) } -// buildFindActivitiesMetadataStatement builds the query metadata statement. -func (c *client) buildFindActivitiesMetadataStatement(_ context.Context, databaseStatement *gorm.DB, meta metadata.Metadata) *gorm.DB { - statement := databaseStatement.Session(&gorm.Session{}) - - statement = statement.Joins("CROSS JOIN LATERAL jsonb_array_elements(actions::jsonb) AS action_element") - - switch data := meta.(type) { - case *metadata.ExchangeSwap: - if data.From.Address != nil { - statement = statement.Where("action_element -> 'metadata' -> 'from' ->> 'address' = ?", data.From.Address) - } - - if data.To.Address != nil { - statement = statement.Where("action_element -> 'metadata' -> 'to' ->> 'address' = ?", data.To.Address) - } - default: - return databaseStatement - } - - return statement -} - // buildActivitiesTableNames builds the activities table names. func (c *client) buildActivitiesTableNames(network network.Network, timestamp time.Time) string { return fmt.Sprintf("%s_%s_%d_q%d", (*table.Activity).TableName(nil), network, timestamp.Year(), int(timestamp.Month()-1)/3+1) diff --git a/internal/database/model/activity.go b/internal/database/model/activity.go index 9f209388..79ce879b 100644 --- a/internal/database/model/activity.go +++ b/internal/database/model/activity.go @@ -4,7 +4,6 @@ import ( "github.com/rss3-network/node/schema/worker/decentralized" "github.com/rss3-network/protocol-go/schema" activityx "github.com/rss3-network/protocol-go/schema/activity" - "github.com/rss3-network/protocol-go/schema/metadata" "github.com/rss3-network/protocol-go/schema/network" "github.com/rss3-network/protocol-go/schema/tag" ) @@ -37,16 +36,16 @@ type ActivitiesQuery struct { } type ActivitiesMetadataQuery struct { - Network *network.Network - Platform *decentralized.Platform - Tag *tag.Tag - Type *schema.Type - Accounts []string - Cursor *activityx.Activity - Status *bool - StartTimestamp *uint64 - EndTimestamp *uint64 - Limit int - ActionLimit int - Metadata *metadata.Metadata + Network *network.Network + Platform *decentralized.Platform + Tag *tag.Tag + Type *schema.Type + Accounts []string + Cursor *activityx.Activity + Status *bool + StartTimestamp *uint64 + EndTimestamp *uint64 + Limit int + ActionLimit int + MetadataQuerySQL *string } diff --git a/internal/node/component/decentralized/handler_metadata.go b/internal/node/component/decentralized/handler_metadata.go index 0d319529..2576f14a 100644 --- a/internal/node/component/decentralized/handler_metadata.go +++ b/internal/node/component/decentralized/handler_metadata.go @@ -1,7 +1,6 @@ package decentralized import ( - "encoding/json" "fmt" "net/http" "strconv" @@ -13,7 +12,6 @@ import ( "github.com/rss3-network/node/docs" "github.com/rss3-network/node/internal/database/model" "github.com/rss3-network/protocol-go/schema" - "github.com/rss3-network/protocol-go/schema/metadata" "github.com/samber/lo" "go.uber.org/zap" ) @@ -22,8 +20,7 @@ import ( func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { request := struct { docs.PostDecentralizedMetadataJSONBody - RawType string `json:"type"` - RawMetadata json.RawMessage `json:"metadata"` + RawType string `json:"type"` }{} if err = ctx.Bind(&request); err != nil { @@ -41,13 +38,6 @@ func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { request.Type = lo.ToPtr(typex) - meta, err := metadata.Unmarshal(typex, request.RawMetadata) - if err != nil { - return response.BadRequestError(ctx, fmt.Errorf("failed to unmarshal metadata: %w", err)) - } - - request.Metadata = lo.ToPtr(meta) - for i := range request.Accounts { if common.IsHexAddress(request.Accounts[i]) { request.Accounts[i] = common.HexToAddress(request.Accounts[i]).String() @@ -81,16 +71,16 @@ func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { } databaseRequest := model.ActivitiesMetadataQuery{ - Cursor: cursor, - StartTimestamp: request.SinceTimestamp, - EndTimestamp: request.UntilTimestamp, - Limit: lo.FromPtr(request.Limit), - ActionLimit: lo.FromPtr(request.ActionLimit), - Accounts: request.Accounts, - Platform: request.Platform, - Status: request.Status, - Network: request.Network, - Metadata: request.Metadata, + Cursor: cursor, + StartTimestamp: request.SinceTimestamp, + EndTimestamp: request.UntilTimestamp, + Limit: lo.FromPtr(request.Limit), + ActionLimit: lo.FromPtr(request.ActionLimit), + Accounts: request.Accounts, + Platform: request.Platform, + Status: request.Status, + Network: request.Network, + MetadataQuerySQL: request.MetadataQueryWhere, } activities, last, err := c.getActivitiesMetadata(ctx.Request().Context(), databaseRequest) From a7ddb22b1a8542a4d477ac35ac11fe78b100b343 Mon Sep 17 00:00:00 2001 From: polebug Date: Wed, 25 Dec 2024 21:29:57 +0800 Subject: [PATCH 2/2] chore --- docs/generated.go | 358 +++++++++--------- ...tchGetDecentralizedMetadataActivities.yaml | 7 +- .../dialer/postgres/client_partitioned.go | 14 +- internal/database/model/activity.go | 25 +- .../decentralized/handler_metadata.go | 37 +- 5 files changed, 232 insertions(+), 209 deletions(-) diff --git a/docs/generated.go b/docs/generated.go index fb55d505..dda0002c 100644 --- a/docs/generated.go +++ b/docs/generated.go @@ -19,6 +19,7 @@ import ( "github.com/rss3-network/node/schema/worker/federated" "github.com/rss3-network/protocol-go/schema" activityx "github.com/rss3-network/protocol-go/schema/activity" + "github.com/rss3-network/protocol-go/schema/metadata" "github.com/rss3-network/protocol-go/schema/network" "github.com/rss3-network/protocol-go/schema/tag" ) @@ -70,12 +71,10 @@ type PostDecentralizedMetadataJSONBody struct { Cursor *string `json:"cursor,omitempty"` // Limit Specify the number of activities to retrieve - Limit *int `default:"100" json:"limit,omitempty" validate:"min=1,max=100"` - - // MetadataQueryWhere SQL WHERE clause for metadata filtering (e.g. actions::jsonb @> '[{"metadata": {"from": {"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}, "to": {"address": "0xB3912b20b3aBc78C15e85E13EC0bF334fbB924f7"}}}]') - MetadataQueryWhere *string `json:"metadata_query_where,omitempty" validate:"required"` - Network *network.Network `json:"network,omitempty" validate:"required"` - Platform *decentralized.Platform `json:"platform,omitempty"` + Limit *int `default:"100" json:"limit,omitempty" validate:"min=1,max=100"` + Metadata *metadata.Metadata `json:"metadata,omitempty" validate:"required"` + Network *network.Network `json:"network,omitempty" validate:"required"` + Platform *decentralized.Platform `json:"platform,omitempty"` // SinceTimestamp The timestamp of when the activity occurred. SinceTimestamp *uint64 `json:"since_timestamp,omitempty"` @@ -784,181 +783,178 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+y9fW/bOPI4/lYI3Q/YO8Bx5Gc7wOI2T70tfm0vnzi7xV0bGLRE27xIolak4niLvPcv", - "+CRREu1Yjp0+bNo/YlsUOTMczgyHM8MvjkfCmEQoYtQ5+eLEMIEhYigpfZvEkC0m0PNIGrGJjzwUsQQG", - "+E/k84Y+ol6CY4ZJ5Jw414glGN0jAD2G7zHDiIJZQkLAFgjQGHl4hpEPVG9Np+GgBxjGAXJOHPfBH/qw", - "P521+6N+F85G/gAhf4TcDup1uq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zzfaXZr2KJylAvOAM+h+wfio7fRjBwOXDXAHiBlb0ga+S9rieRme4IoSRMPCSgjwsCM", - "Q1MC8no83kkgZzErek1/+uLoaC3+mW8jnBNnuVw24dRrRog1YerkLjfRb8oWJJHt1YHWZRhC8HEVRdIF", - "UERPuNI8H99Ln5r8umjLb28jQBckYSfy52P9u/wayy8fsLdAARZmp5dSRkKUgHMc+Stwjb0FTHxKIkDh", - "igK6EBtvco+S5QIF3J5bYrYAHqGMNgCOvCD1eT8JilgDhCRhczhHYtfOpRYFforkSR4CAYnmwEcB75hP", - "bIDE+fsCJWBBUoqaCujYAvN4gcACUiBmAfm8SyiPr/nrNI1RAqMolUFzJAICiwWOwTzh803BNJWMmiAu", - "9JBvHUyT6+MCsp8oiNAD++cmSn48BeckDBHnr/c4wpShBIxTBC6DACUrTjocAQaDOxn/KOPZSBjDaAXg", - "lKRM8GdwryWUIJGmDYk0tULeXk8VBZArd+jhaG7F4jhnjoir+nQ6UU6httvuHrmDI7d943ZPWp2TzrDp", - "uu5/nYbDMBPBV5IP5JKOY0IlrafcEhBQ4ghAEKElWJAQgekKRGTZBG8jyhD0Ob/8RBVsYAqjuySNmbcq", - "bsCd6/H413QqdjQBV22TNAn4AnAWjMX05Pi4uGCOI7Skxznsx1HOwEccjKNpigPOhkeSXkceTKl4qLjg", - "uOV23e5g2HKFccA3sU4ighoYsa1PpSBnCPlyBeY+D4ekzGmsXdnYd05eAo2GgyMfPTgnruEV4TgtBGHJ", - "MuJ73Cp82dZ/BgOKSrTIN8GtQWs0HPXaw9FaEnGTYpIJu1aZaI+NJ82fg1ibuSj/vuzMjyS5Q8nOOn13", - "A/NcP+Jj78E8zCZeQHI9HneOlO2T+XKO/kUmCZrRyQJBn05CiKMJiVEEYzx5j3xsc7rKMx1LnHrDCXGI", - "stCZahR75YRiB5hydU0itIX3qvYQ2SHcOQkCLmumATqN44Tci9yilxgt1c7ZFxjsLE1eaKT3WDjaX2Ck", - "mwT66MWGiugMJQcc7fLBW8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+i/WXyyQ7zerx/nb9jgLVWFfzlnQryIGnSs1Uz1DndclwA+fbBc9ud7vjLncQbRI69htI", - "igaapUC8++AP/dP+2Zt2f9TvwjejiwG69EfI7Vz2Ot1W76IzgKejvtvtlYvH63Mnx30YjPrds/7pEF72", - "4KDVdUdocNkawN603e+PRm7ntD0YjQannmMWSWoNs2uUrwK4uiDCwMnrF+UZwrrSkHP17vQ/meThmyDr", - "vyp75eW9hY1HPRg1MTlmD8fuw7Drom7b7w06aIpas1l7AEeoO2p1e4POtIvcXms48/z+sOcNZqNOp+V3", - "WiM4RcNedzYYuqiTl/U2bTNVu9p9QLPz3mww8HqnF72Ls2Fv6rWHg8uh6w+9ztlw6HVm7UG/3z7PmZaZ", - "haw8Yw9T2m847kPXbbengx4qXY6mC4UjOekqOcPptHr90WjU63Xa7qjv5pPB5+KxkXPE2elZ12/N2oPp", - "6elg0G/Drj9st8+G7nm/O3gzaPVG7XZ31J7pouN7IKK9qLixEdBlxWvxa1ZynCUpWjNNhcrjw/5wNGgP", - "stmrwdjlquSuZUIb1mMK+nRF8jUuh+df9kQim3Q0uW6rPbluv7dL+hTvbndNjeD/fWhIvMYSTSP8R4oA", - "9lHE8AyjJLsE35yJqiUnWdrWo3hUNkSAml4+8017bbh6txBWrnPN1lEt46jqptiXFWBcB1iE523kY0/c", - "4rFcCClQJFS59HvDYiY/Q8U/64rDPRgIRVFimyvRZDu/pJ2TXsAIuTK4pFr/o4Ujb+E0nNPT3y/5H3iP", - "5oR5C26+neYVbM5kwZozFPkXp/92Gs65qMd0bhSo0X6Vyw9jp+G8MWrU/IrniwDPF1wbvv2/j/iOd/7/", - "4yUWpUmchvMORXz3/Q77RPyRlWze4Q+Xp9f8AyF39Fr60t+LHQJvnXk+PiCYjHXBjw8kFX39O0bRWHTz", - "77z8zRVM4DyB8UJ9VqczVyRYhTC5E2W+rsdjrgevIY6mAsfx6e/v+R8Gk7ksDPNbhNWb0hn2X5RYz5eK", - "pUQKG/pmNis7VRaJiI90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0wQJGY7gTRNGC0pieBg3fDdfYVnFticHLwsTx10Fdily2ZmL9exYVt6PpmXTcA3kMcwGmA", - "6rLZeznv1+p2+eq+zovTifCVmrvpWUAgy0eS0MhdE72b0Bh6aIKjyXxqr860LuYoRCFJVvmbT49XJwFc", - "o6wMvU3OQRUiVnIHTldAUqk6a5VIuFpb2QJEuVdvY4TbIQZQ0WuVan1C8E8kNbYes+SEXV8mTQU91uxe", - "KkDdueW252054EIZymbocRbnXQ5BthGj6gYuCWluAOoXKQjhCkSEyWvpEwZ+vbm5ajeETGILLEQ216/8", - "r+pTNhEOEjOaT998np9V5tEsURoEFt9yETDeLVBP1eX4XGHLYHV1L7aEh8OlMXgCjhDGn+Tc3mYmTBEo", - "5ayurrrfrt9pvbl2MBV7UbKRdAyPtmpVtG8zQpITzBBgp8pxn75Y3SaSxX6iAPsNEKaUcQpJP0pDKBTF", - "MuCnT8q0uj36JPu+/ake4OXw5IaD4xmdzCFDS7ja6Al9e/VmDHRDPlszxLyFzEDgm04OesAwhzNrxXkQ", - "h6JyvtywSfWBA8xWWZ9iFWzCQsqN8vQaDp3qFKuHYLlACTIOVwCXOOKEXpjD9Smn8h1giJjidY9EXpok", - "KFJFEyeao9dAlmnU/EVwfXVeWggInMoBNTGb4EIaQCegtXllpDJ9SQHeesyMrkliaN9c37rNnk2hdst6", - "0m32Hh/zcO0ych9giIonWfUIrFny8bYaNP8qDg8kDv9D0gToTTDAEWUw8lAmhGSiE+bEuMcQQCA9BlyC", - "NtSuCD3EhCIKVryngHgwyLsh0nEm6K34fkVSQFGAPNYE/yEp8GAEUsopkNxjD1EQ4DsEonlC7sDftZgV", - "X/n+8h87ymmfhBBHTdkPjONcWFeTIkxprYn/lyNc7tZufG2VVcpPeXHBb5KiKPl3Equttk2uNhztU7Fk", - "zhlcwBaQCaw0VHl8geRxsMRBIHQ2igCJmuCGCxG6IGngC8aM8j1cRiwxdg2doiRKggK4mqRJMBH3hVWA", - "f6csB9FOnqRys4EEAVmKMIg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KGN220652XqZH+Ll4vNJEnO3heCaw7oEVDtVZ2m4xcitdho3O9tfxMW6XLvFDITX", + "YA7pdtN7ay4ZJsBfRrbLNH9bcl3B/sgybeXeVyPP7/haGoNQLgtHW2zOYwcpyA6F5AESB/K2Dvb9lBAY", + "OMsFCqGTEMzx5usry0kq0aCsxEscz9B8p9GtYYtKKFfCmfACvn/EAXwXz/Dh0FUA9oApe4vTODiuJZKb", + "7QRSnBIfCixjzJwZx6aE5M14vJNCzmI69Jz+9NnV0Uz8M99GuGfucrlsgqnfjCFrgtQtuaRStsBEtlcH", + "Pm+iCDi/r+JYugCK5P039byOH6AH8QHKr4u2/PYudugCE3Ymfz7Vv8uvifzyEfkLGCJhdvopZTiCxLlE", + "cbBybpC/ACSgOHYoWFGHLsTGGz9AslzAkNtzS8QWjo8pow0HxX6YBrwfAmPWcCJM2BzModi1c61FnSCF", + "8qQLOiGO504AQ94xH9gQivPpBSTOAqcUNhXSiQXn8QI6C0AdMQow4F0CebzLX6dpAgmI41QGleHYEVQs", + "UOLMCR9v6kxTKagEcqUHAyswza7fF4D9QJ0YPrJ/buLk7+fOJY4iyOXrA4oRZZA44xQ6b8IQkhVnHYod", + "BsJ7GR8o471wlIB45YApTpmQz/BBayjBIs0bHGtuRby9HirqAL64Ax/FcysVp7lwxHypT6cT5RRqe+3u", + "iTc48dq3Xves1TnrDJue5/3HbbgMMRGcJOVATukkwVTyesotAYElih3gxHDpLHAEnenKifGy6byLKYMg", + "4PLyA1W4OVMQ35M0Yf6quAF3b8bjn9Op2NGEfGmbpCTkE8BdMJbQs9PT4oQ5jeGSnua4n8a5AJ9wNE6m", + "KQq5GJ5Ifp34IKXioZKC05bX9bqDYcsTxgHfxLpEHPozbJufaoGcQRjIGZj7PFycMrexdmajwD07BhkN", + "F8UBfHTPPMMrwmlaCMbiZcz3uFX8sq3/DIQUlniRb4Jbg9ZoOOq1h6O1LOImxSRTdq0y054az5o/B7E2", + "c1X+bdmZv2NyD8nOa/ruBualfsRh78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zmixDNF3w1fPf/fkf3", + "vPP/i5ZIlCZxG+57GPPd93sUYPFHVrJ5jz6+Ob/hHzC+pzfSl/5B7BB468zz8RECMtYFPz7iVPT1SwLj", + "sejml7z8zTUgYE5AslCf1enMNQ5XESD3oszXzXjM18EbgOKpoHF8/tsH/ocBMpeFYX6NkXpTOsP+A4n1", + "fKlYSqSwoW9mo7JTZZEYB1CXFJG78tOiS+FpnTT8rnwTxrmBqkxkjrxRu0iXKoJxEAAscjHFQPiyIJch", + "ANr5JQdzYQw6+mMpB/0eLRFVgx7KdqEcdF2+SPwl4sgM31MiBz3KBj1zUUU4wvdAFTnKyr3EavS1VOME", + "xlT0axZBMqQgyaUgMaWAZMPP+Z6XSaK5FKSZFEgf5p87SIEajQPJQI07ZfWVWnEgHknXiV3nQdXGUcl4", + "4qonX7zgBMLZQvXqJdGqbqP5NqA9CRAF0xAGux05NEQv4mAKErprHyqedr8nHtldeJU76+QddfrOlypj", + "fBzANVwXb/Ln9oUkgpRmp0v2l1WTmicNlTur6xktecWlnygE/iIA0eKnlsf/N5Nwk1OncO/h1+DQsd3e", + "XdeZk/XxEm+O9Tbpr8OT84Jr9xuGj0R7++W9zvjl96sfskbvlrMndwV94d1neWL9BXeeNkF52a7zufly", + "0E3obrMu346aMy87VBNzL9un7srVvei2F19XfxC1dKTtqVWpfSVb0xcrzlLphVyq9YxR81owTA5ndvJV", + "ZELDzT9peTEH6W4bLW3e87abzOTreuXe1vMgQNL+drTZsH4hNo8LjBzCzIOemVCnKYWEnmbGlauzCt0x", + "jqDD4CPfz+icpHVWWDk7r9Xq9Hpeq9dt91ter9Xqevkp90/v03tA//wZExxA/x79lOCwmR/P53lxVsTz", + "xgrzUm/P4b8BuJ2M7qjf8TqD3tAbjQYGGX9LfLfh/g1P0wAv5V2OphO60+63R8PesJR7tzUdp/KYHNLT", + "ChJdtwqrMxj2WltZEpv9OR/ymIiL7Ur4Zuf7+/dJ5JEFO+xFM4KrLgsj8GNal8g9b7lfSCLcuK2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r6lMIYoS", + "F5K/pcJbAuqotwultvgvJ6LW8RYJy1VpPC9C0fZsoI2+WRqGq29BPjNCtFBsFFCdrLY/7bNB62y/qspu", + "vg2FL7ie5Sxu5Lac2XSSZ/zuVR3IBE6a4fKSMcgTp7+hUZBIbxwMQunpZ76JquOPqXqub8Zjh/diHYeb", + "8fjFWzyicp9fMoZ5dcm/pInMx8h0fVwDtjCEgo+SvBiHQvKgh6l0BZm4Vy+ADzDESQRj5si2hUzcs9NT", + "cf/eAlN2NpS3Pigga0VLhsdJ8cIzgWpxMVVZv6JmXGPbbooBd9YOryqRZdt1nTtnrN2+NXZ3T/8/AAD/", + "/5e+BJ6WJgEA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml b/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml index 37ceaa31..10610f71 100644 --- a/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml +++ b/docs/requestBody/BatchGetDecentralizedMetadataActivities.yaml @@ -42,8 +42,9 @@ content: validate: "required" platform: $ref: "../schemas/DecentralizedPlatform.yaml" - metadata_query_where: - type: string - description: "SQL WHERE clause for metadata filtering (e.g. actions::jsonb @> '[{\"metadata\": {\"from\": {\"address\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\"}, \"to\": {\"address\": \"0xB3912b20b3aBc78C15e85E13EC0bF334fbB924f7\"}}}]')" + metadata: + type: object + allOf: + - $ref: "../schemas/ProtocolMetadata.yaml" x-oapi-codegen-extra-tags: validate: "required" diff --git a/internal/database/dialer/postgres/client_partitioned.go b/internal/database/dialer/postgres/client_partitioned.go index 6a4d4593..30af2440 100644 --- a/internal/database/dialer/postgres/client_partitioned.go +++ b/internal/database/dialer/postgres/client_partitioned.go @@ -2,6 +2,7 @@ package postgres import ( "context" + "encoding/json" "errors" "fmt" "math" @@ -1041,8 +1042,17 @@ func (c *client) buildFindActivitiesStatement(ctx context.Context, partitionedNa databaseStatement = databaseStatement.Where("timestamp < ? OR (timestamp = ? AND index < ?)", time.Unix(int64(query.Cursor.Timestamp), 0), time.Unix(int64(query.Cursor.Timestamp), 0), query.Cursor.Index) } - if query.MetadataQuerySQL != nil { - databaseStatement = databaseStatement.Where(lo.FromPtr(query.MetadataQuerySQL)) + if query.Metadata != nil { + metadataSQL, err := json.Marshal([]map[string]interface{}{ + { + "metadata": query.Metadata, + }, + }) + if err != nil { + zap.L().Error("failed to marshal metadata", zap.Error(err), zap.Any("metadata", query.Metadata)) + } else { + databaseStatement = databaseStatement.Where("actions::jsonb @> ?", string(metadataSQL)) + } } return databaseStatement.Order("timestamp DESC, index DESC").Limit(query.Limit) diff --git a/internal/database/model/activity.go b/internal/database/model/activity.go index 79ce879b..9f209388 100644 --- a/internal/database/model/activity.go +++ b/internal/database/model/activity.go @@ -4,6 +4,7 @@ import ( "github.com/rss3-network/node/schema/worker/decentralized" "github.com/rss3-network/protocol-go/schema" activityx "github.com/rss3-network/protocol-go/schema/activity" + "github.com/rss3-network/protocol-go/schema/metadata" "github.com/rss3-network/protocol-go/schema/network" "github.com/rss3-network/protocol-go/schema/tag" ) @@ -36,16 +37,16 @@ type ActivitiesQuery struct { } type ActivitiesMetadataQuery struct { - Network *network.Network - Platform *decentralized.Platform - Tag *tag.Tag - Type *schema.Type - Accounts []string - Cursor *activityx.Activity - Status *bool - StartTimestamp *uint64 - EndTimestamp *uint64 - Limit int - ActionLimit int - MetadataQuerySQL *string + Network *network.Network + Platform *decentralized.Platform + Tag *tag.Tag + Type *schema.Type + Accounts []string + Cursor *activityx.Activity + Status *bool + StartTimestamp *uint64 + EndTimestamp *uint64 + Limit int + ActionLimit int + Metadata *metadata.Metadata } diff --git a/internal/node/component/decentralized/handler_metadata.go b/internal/node/component/decentralized/handler_metadata.go index 2576f14a..6729f09c 100644 --- a/internal/node/component/decentralized/handler_metadata.go +++ b/internal/node/component/decentralized/handler_metadata.go @@ -1,6 +1,7 @@ package decentralized import ( + "encoding/json" "fmt" "net/http" "strconv" @@ -12,6 +13,7 @@ import ( "github.com/rss3-network/node/docs" "github.com/rss3-network/node/internal/database/model" "github.com/rss3-network/protocol-go/schema" + "github.com/rss3-network/protocol-go/schema/metadata" "github.com/samber/lo" "go.uber.org/zap" ) @@ -20,7 +22,8 @@ import ( func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { request := struct { docs.PostDecentralizedMetadataJSONBody - RawType string `json:"type"` + RawType string `json:"type"` + RawMetadata json.RawMessage `json:"metadata"` }{} if err = ctx.Bind(&request); err != nil { @@ -44,6 +47,18 @@ func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { } } + // Parse the metadata + if request.RawMetadata == nil || len(request.RawMetadata) == 0 || string(request.RawMetadata) == "{}" { + return response.BadRequestError(ctx, fmt.Errorf("empty metadata")) + } + + meta, err := metadata.Unmarshal(typex, request.RawMetadata) + if err != nil { + return response.BadRequestError(ctx, fmt.Errorf("failed to unmarshal metadata: %w", err)) + } + + request.Metadata = lo.ToPtr(meta) + if err = defaults.Set(&request); err != nil { return response.BadRequestError(ctx, err) } @@ -71,16 +86,16 @@ func (c *Component) BatchGetMetadataActivities(ctx echo.Context) (err error) { } databaseRequest := model.ActivitiesMetadataQuery{ - Cursor: cursor, - StartTimestamp: request.SinceTimestamp, - EndTimestamp: request.UntilTimestamp, - Limit: lo.FromPtr(request.Limit), - ActionLimit: lo.FromPtr(request.ActionLimit), - Accounts: request.Accounts, - Platform: request.Platform, - Status: request.Status, - Network: request.Network, - MetadataQuerySQL: request.MetadataQueryWhere, + Cursor: cursor, + StartTimestamp: request.SinceTimestamp, + EndTimestamp: request.UntilTimestamp, + Limit: lo.FromPtr(request.Limit), + ActionLimit: lo.FromPtr(request.ActionLimit), + Accounts: request.Accounts, + Platform: request.Platform, + Status: request.Status, + Network: request.Network, + Metadata: request.Metadata, } activities, last, err := c.getActivitiesMetadata(ctx.Request().Context(), databaseRequest)