Highly ambitious ATProtocol AppView service and sdks

camel to snake case, ts brained

+141 -140
+2 -2
api/.sqlx/query-01629d5b08a6a71f03843a7e5896156558d07748501dddbda39e8e1e8b5cc0b3.json api/.sqlx/query-b3e9f7ea42151f0ecd801aac9e5cae67f62f8e69790df6c9e2708cb1abb90116.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' AND \"indexedAt\" < $4\n ORDER BY \"indexedAt\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 - "hash": "01629d5b08a6a71f03843a7e5896156558d07748501dddbda39e8e1e8b5cc0b3" 56 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' AND \"indexed_at\" < $4\n ORDER BY \"indexed_at\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 + "hash": "b3e9f7ea42151f0ecd801aac9e5cae67f62f8e69790df6c9e2708cb1abb90116" 56 }
+2 -2
api/.sqlx/query-052e54d34b2f4a1238b7412c6cfbdda1167adc67d4e53a8b6dab1ccae365a09d.json api/.sqlx/query-a9509045ec0283fc988915f8762aca0b407454c6715fad772ddbcdbbfa1bab48.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1\n ORDER BY \"indexedAt\" DESC\n LIMIT $2\n ", 4 "describe": { 5 "columns": [ 6 { ··· 49 false 50 ] 51 }, 52 - "hash": "052e54d34b2f4a1238b7412c6cfbdda1167adc67d4e53a8b6dab1ccae365a09d" 53 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1\n ORDER BY \"indexed_at\" DESC\n LIMIT $2\n ", 4 "describe": { 5 "columns": [ 6 { ··· 49 false 50 ] 51 }, 52 + "hash": "a9509045ec0283fc988915f8762aca0b407454c6715fad772ddbcdbbfa1bab48" 53 }
+16
api/.sqlx/query-10240d7c664eb54bc66b1a7a09e93699abac351c9cbe92ace54efe396258ddf4.json
···
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "INSERT INTO \"actor\" (\"did\", \"handle\", \"indexed_at\")\n VALUES ($1, $2, $3)\n ON CONFLICT (\"did\")\n DO UPDATE SET\n \"handle\" = EXCLUDED.\"handle\",\n \"indexed_at\" = EXCLUDED.\"indexed_at\"", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Text", 9 + "Text", 10 + "Text" 11 + ] 12 + }, 13 + "nullable": [] 14 + }, 15 + "hash": "10240d7c664eb54bc66b1a7a09e93699abac351c9cbe92ace54efe396258ddf4" 16 + }
+2 -2
api/.sqlx/query-12921eae0286fcc35f68925ced57e3ca474706ff0679a413a0f80582d5b3f282.json api/.sqlx/query-b3a299fbe26946bab0f592fee3cb7c85c84a0e2eead9f8a6c5e9450a4d311cc2.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json->>$3 ILIKE '%' || $4 || '%'\n AND \"indexedAt\" < $5\n ORDER BY \"indexedAt\" DESC\n LIMIT $6\n ", 4 "describe": { 5 "columns": [ 6 { ··· 53 false 54 ] 55 }, 56 - "hash": "12921eae0286fcc35f68925ced57e3ca474706ff0679a413a0f80582d5b3f282" 57 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json->>$3 ILIKE '%' || $4 || '%'\n AND \"indexed_at\" < $5\n ORDER BY \"indexed_at\" DESC\n LIMIT $6\n ", 4 "describe": { 5 "columns": [ 6 { ··· 53 false 54 ] 55 }, 56 + "hash": "b3a299fbe26946bab0f592fee3cb7c85c84a0e2eead9f8a6c5e9450a4d311cc2" 57 }
-19
api/.sqlx/query-1cf7ec0df9b51f688ae22b51b32cb264fdfc1bd17ef0327dbffc40429ff09125.json
··· 1 - { 2 - "db_name": "PostgreSQL", 3 - "query": "INSERT INTO \"record\" (\"uri\", \"cid\", \"did\", \"collection\", \"json\", \"indexedAt\")\n VALUES ($1, $2, $3, $4, $5, $6)\n ON CONFLICT (\"uri\")\n DO UPDATE SET\n \"cid\" = EXCLUDED.\"cid\",\n \"json\" = EXCLUDED.\"json\",\n \"indexedAt\" = EXCLUDED.\"indexedAt\"", 4 - "describe": { 5 - "columns": [], 6 - "parameters": { 7 - "Left": [ 8 - "Text", 9 - "Text", 10 - "Text", 11 - "Text", 12 - "Jsonb", 13 - "Timestamptz" 14 - ] 15 - }, 16 - "nullable": [] 17 - }, 18 - "hash": "1cf7ec0df9b51f688ae22b51b32cb264fdfc1bd17ef0327dbffc40429ff09125" 19 - }
···
+2 -2
api/.sqlx/query-2366b092af057c67aae6bb092e78ea6a2396776e227bc78e69eeffabbea22903.json api/.sqlx/query-ac7719747ea4c2e470d97f3ff85657e8fd4ee67323ad72b606bfad3d5bc72363.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "UPDATE \"record\"\n SET \"cid\" = $1, \"json\" = $2, \"indexedAt\" = $3\n WHERE \"uri\" = $4", 4 "describe": { 5 "columns": [], 6 "parameters": { ··· 13 }, 14 "nullable": [] 15 }, 16 - "hash": "2366b092af057c67aae6bb092e78ea6a2396776e227bc78e69eeffabbea22903" 17 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "UPDATE \"record\"\n SET \"cid\" = $1, \"json\" = $2, \"indexed_at\" = $3\n WHERE \"uri\" = $4", 4 "describe": { 5 "columns": [], 6 "parameters": { ··· 13 }, 14 "nullable": [] 15 }, 16 + "hash": "ac7719747ea4c2e470d97f3ff85657e8fd4ee67323ad72b606bfad3d5bc72363" 17 }
+2 -2
api/.sqlx/query-24ffb13eee4338b4c930673096dbb7a0894a6b64ec2cbcce9eac0a00b769e7c8.json api/.sqlx/query-f27e3144fed041f67b17cafe33071a9648e838d0d0b7cc8078d4812b0edb68ff.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND \"indexedAt\" < $3 AND did = $4\n ORDER BY \"indexedAt\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 - "hash": "24ffb13eee4338b4c930673096dbb7a0894a6b64ec2cbcce9eac0a00b769e7c8" 56 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND \"indexed_at\" < $3 AND did = $4\n ORDER BY \"indexed_at\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 + "hash": "f27e3144fed041f67b17cafe33071a9648e838d0d0b7cc8078d4812b0edb68ff" 56 }
+19
api/.sqlx/query-2bc2c43d9327e2fe4630fa60c68341f13d595b39391422d71d4081845485058c.json
···
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "INSERT INTO \"record\" (\"uri\", \"cid\", \"did\", \"collection\", \"json\", \"indexed_at\")\n VALUES ($1, $2, $3, $4, $5, $6)\n ON CONFLICT (\"uri\")\n DO UPDATE SET\n \"cid\" = EXCLUDED.\"cid\",\n \"json\" = EXCLUDED.\"json\",\n \"indexed_at\" = EXCLUDED.\"indexed_at\"", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Text", 9 + "Text", 10 + "Text", 11 + "Text", 12 + "Jsonb", 13 + "Timestamptz" 14 + ] 15 + }, 16 + "nullable": [] 17 + }, 18 + "hash": "2bc2c43d9327e2fe4630fa60c68341f13d595b39391422d71d4081845485058c" 19 + }
+2 -2
api/.sqlx/query-355e5871eb807516fee1d9ac2d39c132218dc35d4260f948fc750ffe2c8b5633.json api/.sqlx/query-b5b493ad7657c9e7cf6e9cd0b999982ff05b6c1102a6b496ed9b73d805f459eb.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND \"indexedAt\" < $2 AND did = $3\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "355e5871eb807516fee1d9ac2d39c132218dc35d4260f948fc750ffe2c8b5633" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND \"indexed_at\" < $2 AND did = $3\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "b5b493ad7657c9e7cf6e9cd0b999982ff05b6c1102a6b496ed9b73d805f459eb" 55 }
+2 -2
api/.sqlx/query-3dad1fda75b0d7a0f8445f90e75d2bb35e61616a0de37cb9813fcbae91c61dec.json api/.sqlx/query-228440681ddeaa07f565e09ff9d03e58e53523ff2425d12e9091d801e42c2a93.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json::text ILIKE '%' || $3 || '%'\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "3dad1fda75b0d7a0f8445f90e75d2bb35e61616a0de37cb9813fcbae91c61dec" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json::text ILIKE '%' || $3 || '%'\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "228440681ddeaa07f565e09ff9d03e58e53523ff2425d12e9091d801e42c2a93" 55 }
-19
api/.sqlx/query-50f33017c53d038039369745f9bc6eb634fed08801b1338d5280a70dbce31533.json
··· 1 - { 2 - "db_name": "PostgreSQL", 3 - "query": "INSERT INTO \"record\" (\"uri\", \"cid\", \"did\", \"collection\", \"json\", \"indexedAt\")\n VALUES ($1, $2, $3, $4, $5, $6)\n ON CONFLICT (\"uri\")\n DO UPDATE SET\n \"cid\" = EXCLUDED.\"cid\",\n \"json\" = EXCLUDED.\"json\",\n \"indexedAt\" = EXCLUDED.\"indexedAt\"", 4 - "describe": { 5 - "columns": [], 6 - "parameters": { 7 - "Left": [ 8 - "Text", 9 - "Text", 10 - "Text", 11 - "Text", 12 - "Jsonb", 13 - "Timestamptz" 14 - ] 15 - }, 16 - "nullable": [] 17 - }, 18 - "hash": "50f33017c53d038039369745f9bc6eb634fed08801b1338d5280a70dbce31533" 19 - }
···
+2 -2
api/.sqlx/query-5a599c737c4f6fec189db8b746f531e340029013b3a922c018b02ca786687cb2.json api/.sqlx/query-36e6dfe781ccf215a4433af2099ffe31b0c331a862e25e2569f1aed559b8f623.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' AND \"indexedAt\" < $3\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "5a599c737c4f6fec189db8b746f531e340029013b3a922c018b02ca786687cb2" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' AND \"indexed_at\" < $3\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "36e6dfe781ccf215a4433af2099ffe31b0c331a862e25e2569f1aed559b8f623" 55 }
+2 -2
api/.sqlx/query-68c746db95e04583901495104b19dc0b53641299d19d92041b456d081837ac23.json api/.sqlx/query-3d8835c549ebb7ebbb0b98a5e277693718943d6666c61c89bd8d0c7045beddc5.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json->>$3 ILIKE '%' || $4 || '%'\n ORDER BY \"indexedAt\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 - "hash": "68c746db95e04583901495104b19dc0b53641299d19d92041b456d081837ac23" 56 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json->>$3 ILIKE '%' || $4 || '%'\n ORDER BY \"indexed_at\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 + "hash": "3d8835c549ebb7ebbb0b98a5e277693718943d6666c61c89bd8d0c7045beddc5" 56 }
+2 -2
api/.sqlx/query-6e9f9a70a2f73dda1212a54779ca31a83553bfbd1881a00f6569125366dad9b0.json api/.sqlx/query-4e972a45fd7d2246f8444178cea6f03783cecc3246a73720bef8d36391758731.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json::text ILIKE '%' || $3 || '%'\n AND \"indexedAt\" < $4\n ORDER BY \"indexedAt\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 - "hash": "6e9f9a70a2f73dda1212a54779ca31a83553bfbd1881a00f6569125366dad9b0" 56 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 \n AND json::text ILIKE '%' || $3 || '%'\n AND \"indexed_at\" < $4\n ORDER BY \"indexed_at\" DESC\n LIMIT $5\n ", 4 "describe": { 5 "columns": [ 6 { ··· 52 false 53 ] 54 }, 55 + "hash": "4e972a45fd7d2246f8444178cea6f03783cecc3246a73720bef8d36391758731" 56 }
-16
api/.sqlx/query-86bed20ba42aeb816acbe4c4119bc14598d7035122938f906a1a61f5a2ff4787.json
··· 1 - { 2 - "db_name": "PostgreSQL", 3 - "query": "INSERT INTO \"actor\" (\"did\", \"handle\", \"indexedAt\")\n VALUES ($1, $2, $3)\n ON CONFLICT (\"did\")\n DO UPDATE SET\n \"handle\" = EXCLUDED.\"handle\",\n \"indexedAt\" = EXCLUDED.\"indexedAt\"", 4 - "describe": { 5 - "columns": [], 6 - "parameters": { 7 - "Left": [ 8 - "Text", 9 - "Text", 10 - "Text" 11 - ] 12 - }, 13 - "nullable": [] 14 - }, 15 - "hash": "86bed20ba42aeb816acbe4c4119bc14598d7035122938f906a1a61f5a2ff4787" 16 - }
···
+2 -2
api/.sqlx/query-8c71853aa2b8163391256fe942e018adb6ec4907e6dba601c8ab2c9534047018.json api/.sqlx/query-4b6ded5f8ded05fbe7f2a86d953f6354a7ed152a43edb62929dfcead90b2ded7.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND \"indexedAt\" < $2\n ORDER BY \"indexedAt\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 - "hash": "8c71853aa2b8163391256fe942e018adb6ec4907e6dba601c8ab2c9534047018" 54 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND \"indexed_at\" < $2\n ORDER BY \"indexed_at\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 + "hash": "4b6ded5f8ded05fbe7f2a86d953f6354a7ed152a43edb62929dfcead90b2ded7" 54 }
+2 -2
api/.sqlx/query-9281c3709a89150133f82a06e12935d11f4ad2430afb40c0e57ce2b176b49b7a.json api/.sqlx/query-8ba11ecc45d700185bd2d1ac084544c6db2de648f2c22be727bc97661827c4a6.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND did = $2\n ORDER BY \"indexedAt\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 - "hash": "9281c3709a89150133f82a06e12935d11f4ad2430afb40c0e57ce2b176b49b7a" 54 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND did = $2\n ORDER BY \"indexed_at\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 + "hash": "8ba11ecc45d700185bd2d1ac084544c6db2de648f2c22be727bc97661827c4a6" 54 }
+2 -2
api/.sqlx/query-9c84212d82e43b4c28af078a39baf0a822f2ae33d3769fa802cb18258e9b619d.json api/.sqlx/query-b69ea68696e635fed481381603291cfa922e0d2334e33fc8a650ed953b698910.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2\n ORDER BY \"indexedAt\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 - "hash": "9c84212d82e43b4c28af078a39baf0a822f2ae33d3769fa802cb18258e9b619d" 54 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2\n ORDER BY \"indexed_at\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 + "hash": "b69ea68696e635fed481381603291cfa922e0d2334e33fc8a650ed953b698910" 54 }
+2 -2
api/.sqlx/query-ca89a5526b9f8da5f1525e592c00fe93f414052ad4c102b4b731524e5a797a0c.json api/.sqlx/query-91f3bbbc29ae237116165a43f1be55047285c8211c71629c3aac03821c4edeed.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%'\n ORDER BY \"indexedAt\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 - "hash": "ca89a5526b9f8da5f1525e592c00fe93f414052ad4c102b4b731524e5a797a0c" 54 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%'\n ORDER BY \"indexed_at\" DESC\n LIMIT $3\n ", 4 "describe": { 5 "columns": [ 6 { ··· 50 false 51 ] 52 }, 53 + "hash": "91f3bbbc29ae237116165a43f1be55047285c8211c71629c3aac03821c4edeed" 54 }
+2 -2
api/.sqlx/query-d41fad548099a4b7ce964162690d70220f97692dd4e06ab471cb05e49961e79c.json api/.sqlx/query-59dfa83f447ba0dced057b930f49bafe15eec214d1b559ee2740d86a4eadd039.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%'\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "d41fad548099a4b7ce964162690d70220f97692dd4e06ab471cb05e49961e79c" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%'\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "59dfa83f447ba0dced057b930f49bafe15eec214d1b559ee2740d86a4eadd039" 55 }
+2 -2
api/.sqlx/query-d89464bd37135b262b5c23d50e8e0bd451a4e89d60ce45e9b874d0a4a90492e4.json api/.sqlx/query-473a7c2a3db78b03e4be6190777113e307ceed271fc659fefe333b5e4aa7488a.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND \"indexedAt\" < $3\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "d89464bd37135b262b5c23d50e8e0bd451a4e89d60ce45e9b874d0a4a90492e4" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND \"indexed_at\" < $3\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "473a7c2a3db78b03e4be6190777113e307ceed271fc659fefe333b5e4aa7488a" 55 }
+19
api/.sqlx/query-e524e8fa627c76e2f8f8c47b31d1ed527ed8da5d07f054c4a1a7e1a4826e5758.json
···
··· 1 + { 2 + "db_name": "PostgreSQL", 3 + "query": "INSERT INTO \"record\" (\"uri\", \"cid\", \"did\", \"collection\", \"json\", \"indexed_at\")\n VALUES ($1, $2, $3, $4, $5, $6)\n ON CONFLICT (\"uri\")\n DO UPDATE SET\n \"cid\" = EXCLUDED.\"cid\",\n \"json\" = EXCLUDED.\"json\",\n \"indexed_at\" = EXCLUDED.\"indexed_at\"", 4 + "describe": { 5 + "columns": [], 6 + "parameters": { 7 + "Left": [ 8 + "Text", 9 + "Text", 10 + "Text", 11 + "Text", 12 + "Jsonb", 13 + "Timestamptz" 14 + ] 15 + }, 16 + "nullable": [] 17 + }, 18 + "hash": "e524e8fa627c76e2f8f8c47b31d1ed527ed8da5d07f054c4a1a7e1a4826e5758" 19 + }
+2 -2
api/.sqlx/query-f61c2d1fd9f72287378a58443008c4f6184a37a1282907a6a2ad42708954c554.json api/.sqlx/query-e7bb310f71810de66fefa8490770011c56e9875b5af415d3e81aad44431d0999.json
··· 1 { 2 "db_name": "PostgreSQL", 3 - "query": "\n SELECT uri, cid, did, collection, json, \"indexedAt\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND did = $3\n ORDER BY \"indexedAt\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 - "hash": "f61c2d1fd9f72287378a58443008c4f6184a37a1282907a6a2ad42708954c554" 55 }
··· 1 { 2 "db_name": "PostgreSQL", 3 + "query": "\n SELECT uri, cid, did, collection, json, \"indexed_at\" as indexed_at\n FROM record\n WHERE collection = $1 AND json->>'slice' = $2 AND did = $3\n ORDER BY \"indexed_at\" DESC\n LIMIT $4\n ", 4 "describe": { 5 "columns": [ 6 { ··· 51 false 52 ] 53 }, 54 + "hash": "e7bb310f71810de66fefa8490770011c56e9875b5af415d3e81aad44431d0999" 55 }
+3
api/migrations/003_snake_case_columns.sql
···
··· 1 + -- Rename indexedAt columns to snake_case 2 + ALTER TABLE "record" RENAME COLUMN "indexedAt" TO "indexed_at"; 3 + ALTER TABLE "actor" RENAME COLUMN "indexedAt" TO "indexed_at";
+50 -50
api/src/database.rs
··· 16 #[allow(dead_code)] 17 pub async fn insert_record(&self, record: &Record) -> Result<(), DatabaseError> { 18 sqlx::query!( 19 - r#"INSERT INTO "record" ("uri", "cid", "did", "collection", "json", "indexedAt") 20 VALUES ($1, $2, $3, $4, $5, $6) 21 ON CONFLICT ("uri") 22 DO UPDATE SET 23 "cid" = EXCLUDED."cid", 24 "json" = EXCLUDED."json", 25 - "indexedAt" = EXCLUDED."indexedAt""#, 26 record.uri, 27 record.cid, 28 record.did, ··· 41 42 for record in records { 43 sqlx::query!( 44 - r#"INSERT INTO "record" ("uri", "cid", "did", "collection", "json", "indexedAt") 45 VALUES ($1, $2, $3, $4, $5, $6) 46 ON CONFLICT ("uri") 47 DO UPDATE SET 48 "cid" = EXCLUDED."cid", 49 "json" = EXCLUDED."json", 50 - "indexedAt" = EXCLUDED."indexedAt""#, 51 record.uri, 52 record.cid, 53 record.did, ··· 65 66 pub async fn get_record(&self, uri: &str) -> Result<Option<IndexedRecord>, DatabaseError> { 67 let record = sqlx::query_as::<_, Record>( 68 - r#"SELECT "uri", "cid", "did", "collection", "json", "indexedAt" 69 FROM "record" 70 WHERE "uri" = $1"#, 71 ) ··· 88 89 pub async fn get_lexicons_by_slice(&self, slice_uri: &str) -> Result<Vec<serde_json::Value>, DatabaseError> { 90 let records = sqlx::query_as::<_, Record>( 91 - r#"SELECT "uri", "cid", "did", "collection", "json", "indexedAt" 92 FROM "record" 93 WHERE "collection" = 'social.slices.lexicon' 94 AND "json"->>'slice' = $1 95 - ORDER BY "indexedAt" DESC"#, 96 ) 97 .bind(slice_uri) 98 .fetch_all(&self.pool) ··· 129 pub async fn update_record(&self, record: &Record) -> Result<(), DatabaseError> { 130 let result = sqlx::query!( 131 r#"UPDATE "record" 132 - SET "cid" = $1, "json" = $2, "indexedAt" = $3 133 WHERE "uri" = $4"#, 134 record.cid, 135 record.json, ··· 166 167 for actor in actors { 168 sqlx::query!( 169 - r#"INSERT INTO "actor" ("did", "handle", "indexedAt") 170 VALUES ($1, $2, $3) 171 ON CONFLICT ("did") 172 DO UPDATE SET 173 "handle" = EXCLUDED."handle", 174 - "indexedAt" = EXCLUDED."indexedAt""#, 175 actor.did, 176 actor.handle, 177 actor.indexed_at ··· 323 sqlx::query_as!( 324 Record, 325 r#" 326 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 327 FROM record 328 WHERE collection = $1 AND json->>'slice' = $2 329 AND json->>$3 ILIKE '%' || $4 || '%' 330 - AND "indexedAt" < $5 331 - ORDER BY "indexedAt" DESC 332 LIMIT $6 333 "#, 334 collection, ··· 347 sqlx::query_as!( 348 Record, 349 r#" 350 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 351 FROM record 352 WHERE collection = $1 AND json->>'slice' = $2 353 AND json::text ILIKE '%' || $3 || '%' 354 - AND "indexedAt" < $4 355 - ORDER BY "indexedAt" DESC 356 LIMIT $5 357 "#, 358 collection, ··· 368 sqlx::query_as!( 369 Record, 370 r#" 371 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 372 FROM record 373 WHERE collection = $1 AND json->>'slice' = $2 374 AND json->>$3 ILIKE '%' || $4 || '%' 375 - ORDER BY "indexedAt" DESC 376 LIMIT $5 377 "#, 378 collection, ··· 388 sqlx::query_as!( 389 Record, 390 r#" 391 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 392 FROM record 393 WHERE collection = $1 AND json->>'slice' = $2 394 AND json::text ILIKE '%' || $3 || '%' 395 - ORDER BY "indexedAt" DESC 396 LIMIT $4 397 "#, 398 collection, ··· 436 sqlx::query_as!( 437 Record, 438 r#" 439 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 440 FROM record 441 - WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' AND "indexedAt" < $4 442 - ORDER BY "indexedAt" DESC 443 LIMIT $5 444 "#, 445 collection, ··· 457 sqlx::query_as!( 458 Record, 459 r#" 460 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 461 FROM record 462 - WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' AND "indexedAt" < $3 463 - ORDER BY "indexedAt" DESC 464 LIMIT $4 465 "#, 466 collection, ··· 475 sqlx::query_as!( 476 Record, 477 r#" 478 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 479 FROM record 480 WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' 481 - ORDER BY "indexedAt" DESC 482 LIMIT $4 483 "#, 484 collection, ··· 493 sqlx::query_as!( 494 Record, 495 r#" 496 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 497 FROM record 498 WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' 499 - ORDER BY "indexedAt" DESC 500 LIMIT $3 501 "#, 502 collection, ··· 531 sqlx::query_as!( 532 Record, 533 r#" 534 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 535 FROM record 536 - WHERE collection = $1 AND json->>'slice' = $2 AND "indexedAt" < $3 AND did = $4 537 - ORDER BY "indexedAt" DESC 538 LIMIT $5 539 "#, 540 collection, ··· 552 sqlx::query_as!( 553 Record, 554 r#" 555 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 556 FROM record 557 - WHERE collection = $1 AND json->>'slice' = $2 AND "indexedAt" < $3 558 - ORDER BY "indexedAt" DESC 559 LIMIT $4 560 "#, 561 collection, ··· 570 sqlx::query_as!( 571 Record, 572 r#" 573 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 574 FROM record 575 WHERE collection = $1 AND json->>'slice' = $2 AND did = $3 576 - ORDER BY "indexedAt" DESC 577 LIMIT $4 578 "#, 579 collection, ··· 588 sqlx::query_as!( 589 Record, 590 r#" 591 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 592 FROM record 593 WHERE collection = $1 AND json->>'slice' = $2 594 - ORDER BY "indexedAt" DESC 595 LIMIT $3 596 "#, 597 collection, ··· 634 sqlx::query_as!( 635 Record, 636 r#" 637 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 638 FROM record 639 - WHERE collection = $1 AND "indexedAt" < $2 AND did = $3 640 - ORDER BY "indexedAt" DESC 641 LIMIT $4 642 "#, 643 collection, ··· 654 sqlx::query_as!( 655 Record, 656 r#" 657 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 658 FROM record 659 - WHERE collection = $1 AND "indexedAt" < $2 660 - ORDER BY "indexedAt" DESC 661 LIMIT $3 662 "#, 663 collection, ··· 671 sqlx::query_as!( 672 Record, 673 r#" 674 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 675 FROM record 676 WHERE collection = $1 AND did = $2 677 - ORDER BY "indexedAt" DESC 678 LIMIT $3 679 "#, 680 collection, ··· 688 sqlx::query_as!( 689 Record, 690 r#" 691 - SELECT uri, cid, did, collection, json, "indexedAt" as indexed_at 692 FROM record 693 WHERE collection = $1 694 - ORDER BY "indexedAt" DESC 695 LIMIT $2 696 "#, 697 collection,
··· 16 #[allow(dead_code)] 17 pub async fn insert_record(&self, record: &Record) -> Result<(), DatabaseError> { 18 sqlx::query!( 19 + r#"INSERT INTO "record" ("uri", "cid", "did", "collection", "json", "indexed_at") 20 VALUES ($1, $2, $3, $4, $5, $6) 21 ON CONFLICT ("uri") 22 DO UPDATE SET 23 "cid" = EXCLUDED."cid", 24 "json" = EXCLUDED."json", 25 + "indexed_at" = EXCLUDED."indexed_at""#, 26 record.uri, 27 record.cid, 28 record.did, ··· 41 42 for record in records { 43 sqlx::query!( 44 + r#"INSERT INTO "record" ("uri", "cid", "did", "collection", "json", "indexed_at") 45 VALUES ($1, $2, $3, $4, $5, $6) 46 ON CONFLICT ("uri") 47 DO UPDATE SET 48 "cid" = EXCLUDED."cid", 49 "json" = EXCLUDED."json", 50 + "indexed_at" = EXCLUDED."indexed_at""#, 51 record.uri, 52 record.cid, 53 record.did, ··· 65 66 pub async fn get_record(&self, uri: &str) -> Result<Option<IndexedRecord>, DatabaseError> { 67 let record = sqlx::query_as::<_, Record>( 68 + r#"SELECT "uri", "cid", "did", "collection", "json", "indexed_at" 69 FROM "record" 70 WHERE "uri" = $1"#, 71 ) ··· 88 89 pub async fn get_lexicons_by_slice(&self, slice_uri: &str) -> Result<Vec<serde_json::Value>, DatabaseError> { 90 let records = sqlx::query_as::<_, Record>( 91 + r#"SELECT "uri", "cid", "did", "collection", "json", "indexed_at" 92 FROM "record" 93 WHERE "collection" = 'social.slices.lexicon' 94 AND "json"->>'slice' = $1 95 + ORDER BY "indexed_at" DESC"#, 96 ) 97 .bind(slice_uri) 98 .fetch_all(&self.pool) ··· 129 pub async fn update_record(&self, record: &Record) -> Result<(), DatabaseError> { 130 let result = sqlx::query!( 131 r#"UPDATE "record" 132 + SET "cid" = $1, "json" = $2, "indexed_at" = $3 133 WHERE "uri" = $4"#, 134 record.cid, 135 record.json, ··· 166 167 for actor in actors { 168 sqlx::query!( 169 + r#"INSERT INTO "actor" ("did", "handle", "indexed_at") 170 VALUES ($1, $2, $3) 171 ON CONFLICT ("did") 172 DO UPDATE SET 173 "handle" = EXCLUDED."handle", 174 + "indexed_at" = EXCLUDED."indexed_at""#, 175 actor.did, 176 actor.handle, 177 actor.indexed_at ··· 323 sqlx::query_as!( 324 Record, 325 r#" 326 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 327 FROM record 328 WHERE collection = $1 AND json->>'slice' = $2 329 AND json->>$3 ILIKE '%' || $4 || '%' 330 + AND "indexed_at" < $5 331 + ORDER BY "indexed_at" DESC 332 LIMIT $6 333 "#, 334 collection, ··· 347 sqlx::query_as!( 348 Record, 349 r#" 350 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 351 FROM record 352 WHERE collection = $1 AND json->>'slice' = $2 353 AND json::text ILIKE '%' || $3 || '%' 354 + AND "indexed_at" < $4 355 + ORDER BY "indexed_at" DESC 356 LIMIT $5 357 "#, 358 collection, ··· 368 sqlx::query_as!( 369 Record, 370 r#" 371 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 372 FROM record 373 WHERE collection = $1 AND json->>'slice' = $2 374 AND json->>$3 ILIKE '%' || $4 || '%' 375 + ORDER BY "indexed_at" DESC 376 LIMIT $5 377 "#, 378 collection, ··· 388 sqlx::query_as!( 389 Record, 390 r#" 391 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 392 FROM record 393 WHERE collection = $1 AND json->>'slice' = $2 394 AND json::text ILIKE '%' || $3 || '%' 395 + ORDER BY "indexed_at" DESC 396 LIMIT $4 397 "#, 398 collection, ··· 436 sqlx::query_as!( 437 Record, 438 r#" 439 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 440 FROM record 441 + WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' AND "indexed_at" < $4 442 + ORDER BY "indexed_at" DESC 443 LIMIT $5 444 "#, 445 collection, ··· 457 sqlx::query_as!( 458 Record, 459 r#" 460 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 461 FROM record 462 + WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' AND "indexed_at" < $3 463 + ORDER BY "indexed_at" DESC 464 LIMIT $4 465 "#, 466 collection, ··· 475 sqlx::query_as!( 476 Record, 477 r#" 478 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 479 FROM record 480 WHERE collection = $1 AND json->>$2 ILIKE '%' || $3 || '%' 481 + ORDER BY "indexed_at" DESC 482 LIMIT $4 483 "#, 484 collection, ··· 493 sqlx::query_as!( 494 Record, 495 r#" 496 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 497 FROM record 498 WHERE collection = $1 AND json::text ILIKE '%' || $2 || '%' 499 + ORDER BY "indexed_at" DESC 500 LIMIT $3 501 "#, 502 collection, ··· 531 sqlx::query_as!( 532 Record, 533 r#" 534 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 535 FROM record 536 + WHERE collection = $1 AND json->>'slice' = $2 AND "indexed_at" < $3 AND did = $4 537 + ORDER BY "indexed_at" DESC 538 LIMIT $5 539 "#, 540 collection, ··· 552 sqlx::query_as!( 553 Record, 554 r#" 555 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 556 FROM record 557 + WHERE collection = $1 AND json->>'slice' = $2 AND "indexed_at" < $3 558 + ORDER BY "indexed_at" DESC 559 LIMIT $4 560 "#, 561 collection, ··· 570 sqlx::query_as!( 571 Record, 572 r#" 573 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 574 FROM record 575 WHERE collection = $1 AND json->>'slice' = $2 AND did = $3 576 + ORDER BY "indexed_at" DESC 577 LIMIT $4 578 "#, 579 collection, ··· 588 sqlx::query_as!( 589 Record, 590 r#" 591 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 592 FROM record 593 WHERE collection = $1 AND json->>'slice' = $2 594 + ORDER BY "indexed_at" DESC 595 LIMIT $3 596 "#, 597 collection, ··· 634 sqlx::query_as!( 635 Record, 636 r#" 637 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 638 FROM record 639 + WHERE collection = $1 AND "indexed_at" < $2 AND did = $3 640 + ORDER BY "indexed_at" DESC 641 LIMIT $4 642 "#, 643 collection, ··· 654 sqlx::query_as!( 655 Record, 656 r#" 657 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 658 FROM record 659 + WHERE collection = $1 AND "indexed_at" < $2 660 + ORDER BY "indexed_at" DESC 661 LIMIT $3 662 "#, 663 collection, ··· 671 sqlx::query_as!( 672 Record, 673 r#" 674 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 675 FROM record 676 WHERE collection = $1 AND did = $2 677 + ORDER BY "indexed_at" DESC 678 LIMIT $3 679 "#, 680 collection, ··· 688 sqlx::query_as!( 689 Record, 690 r#" 691 + SELECT uri, cid, did, collection, json, "indexed_at" as indexed_at 692 FROM record 693 WHERE collection = $1 694 + ORDER BY "indexed_at" DESC 695 LIMIT $2 696 "#, 697 collection,
-2
api/src/models.rs
··· 10 pub collection: String, 11 pub json: Value, 12 #[serde(rename = "indexedAt")] 13 - #[sqlx(rename = "indexedAt")] 14 pub indexed_at: DateTime<Utc>, 15 } 16 ··· 53 pub did: String, 54 pub handle: Option<String>, 55 #[serde(rename = "indexedAt")] 56 - #[sqlx(rename = "indexedAt")] 57 pub indexed_at: String, 58 } 59
··· 10 pub collection: String, 11 pub json: Value, 12 #[serde(rename = "indexedAt")] 13 pub indexed_at: DateTime<Utc>, 14 } 15 ··· 52 pub did: String, 53 pub handle: Option<String>, 54 #[serde(rename = "indexedAt")] 55 pub indexed_at: String, 56 } 57