diff --git a/.sqlx/query-00a148c6f7df2c7f797208791f30f725f945dc6885b993a42d7f563903f90c01.json b/.sqlx/query-00a148c6f7df2c7f797208791f30f725f945dc6885b993a42d7f563903f90c01.json new file mode 100644 index 0000000..0c51665 --- /dev/null +++ b/.sqlx/query-00a148c6f7df2c7f797208791f30f725f945dc6885b993a42d7f563903f90c01.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE (parent_job_id IS NOT DISTINCT FROM $1) ORDER BY id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "00a148c6f7df2c7f797208791f30f725f945dc6885b993a42d7f563903f90c01" +} diff --git a/.sqlx/query-b159b9dbbbc5646ef69a2bd201e33de36f140167d3c444af580ea7a7e226d3a2.json b/.sqlx/query-05dea28c0b95dbb9a20db7c96f173ca15f53f26a43be97a3246941f66faca060.json similarity index 64% rename from .sqlx/query-b159b9dbbbc5646ef69a2bd201e33de36f140167d3c444af580ea7a7e226d3a2.json rename to .sqlx/query-05dea28c0b95dbb9a20db7c96f173ca15f53f26a43be97a3246941f66faca060.json index 38f6477..01e505d 100644 --- a/.sqlx/query-b159b9dbbbc5646ef69a2bd201e33de36f140167d3c444af580ea7a7e226d3a2.json +++ b/.sqlx/query-05dea28c0b95dbb9a20db7c96f173ca15f53f26a43be97a3246941f66faca060.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE (NOT $1 OR parent_job_id IS NOT DISTINCT FROM $2) AND (COALESCE((created_at, id) < ($5, $4), $4 IS NULL)) ORDER BY created_at DESC, id DESC LIMIT $3) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $6 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id = $1 AND ((created_at, id) < ($4, $3)) ORDER BY created_at DESC, id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $5 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -36,7 +36,6 @@ ], "parameters": { "Left": [ - "Bool", "Uuid", "Int8", "Uuid", @@ -53,5 +52,5 @@ null ] }, - "hash": "b159b9dbbbc5646ef69a2bd201e33de36f140167d3c444af580ea7a7e226d3a2" + "hash": "05dea28c0b95dbb9a20db7c96f173ca15f53f26a43be97a3246941f66faca060" } diff --git a/.sqlx/query-20428d9756e20ceaee1489d7290db2429a3fb4f4f83cae1d37387c9af41da650.json b/.sqlx/query-1ff4c7793bd4803c620b666a16774ebc653797fc1e36d918a71c0768a6b9a1bd.json similarity index 66% rename from .sqlx/query-20428d9756e20ceaee1489d7290db2429a3fb4f4f83cae1d37387c9af41da650.json rename to .sqlx/query-1ff4c7793bd4803c620b666a16774ebc653797fc1e36d918a71c0768a6b9a1bd.json index f591064..b63efff 100644 --- a/.sqlx/query-20428d9756e20ceaee1489d7290db2429a3fb4f4f83cae1d37387c9af41da650.json +++ b/.sqlx/query-1ff4c7793bd4803c620b666a16774ebc653797fc1e36d918a71c0768a6b9a1bd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE (COALESCE((created_at, id) < ($3, $2), $2 IS NULL)) ORDER BY created_at DESC, id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id IS NULL AND ((created_at, id) > ($3, $2)) ORDER BY created_at ASC, id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", "describe": { "columns": [ { @@ -51,5 +51,5 @@ null ] }, - "hash": "20428d9756e20ceaee1489d7290db2429a3fb4f4f83cae1d37387c9af41da650" + "hash": "1ff4c7793bd4803c620b666a16774ebc653797fc1e36d918a71c0768a6b9a1bd" } diff --git a/.sqlx/query-2ab3b9ed4e4ed6264a122c649df0e1b7648aff8906f3ebafc4328131d7e43d76.json b/.sqlx/query-2ab3b9ed4e4ed6264a122c649df0e1b7648aff8906f3ebafc4328131d7e43d76.json new file mode 100644 index 0000000..f5fd264 --- /dev/null +++ b/.sqlx/query-2ab3b9ed4e4ed6264a122c649df0e1b7648aff8906f3ebafc4328131d7e43d76.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id = $1 AND (id > $3) ORDER BY id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Uuid", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "2ab3b9ed4e4ed6264a122c649df0e1b7648aff8906f3ebafc4328131d7e43d76" +} diff --git a/.sqlx/query-b4c3a105fc5db78ba4fba6bb679930e7d36132440e28ccf9f30166c0f00803fc.json b/.sqlx/query-2b34ee3530c17185a0f2fe29042e906135f46569e342754120af9c3378951610.json similarity index 65% rename from .sqlx/query-b4c3a105fc5db78ba4fba6bb679930e7d36132440e28ccf9f30166c0f00803fc.json rename to .sqlx/query-2b34ee3530c17185a0f2fe29042e906135f46569e342754120af9c3378951610.json index 12cebfc..c87e644 100644 --- a/.sqlx/query-b4c3a105fc5db78ba4fba6bb679930e7d36132440e28ccf9f30166c0f00803fc.json +++ b/.sqlx/query-2b34ee3530c17185a0f2fe29042e906135f46569e342754120af9c3378951610.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT id FROM jobs WHERE (COALESCE(id > $2, true)) ORDER BY id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "query": "WITH entities AS (SELECT id FROM jobs WHERE (id < $2) ORDER BY id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -50,5 +50,5 @@ null ] }, - "hash": "b4c3a105fc5db78ba4fba6bb679930e7d36132440e28ccf9f30166c0f00803fc" + "hash": "2b34ee3530c17185a0f2fe29042e906135f46569e342754120af9c3378951610" } diff --git a/.sqlx/query-3ef03f36e1d16c031c958ccacb62cfc14634236e7370e7fdc1d617a756bac764.json b/.sqlx/query-3ef03f36e1d16c031c958ccacb62cfc14634236e7370e7fdc1d617a756bac764.json new file mode 100644 index 0000000..db03080 --- /dev/null +++ b/.sqlx/query-3ef03f36e1d16c031c958ccacb62cfc14634236e7370e7fdc1d617a756bac764.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id IS NULL ORDER BY created_at ASC, id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "3ef03f36e1d16c031c958ccacb62cfc14634236e7370e7fdc1d617a756bac764" +} diff --git a/.sqlx/query-3ef4d74f3ec50dad4478d955ab3356f132ab331c234ba25fe8052930c7e3932a.json b/.sqlx/query-3ef4d74f3ec50dad4478d955ab3356f132ab331c234ba25fe8052930c7e3932a.json new file mode 100644 index 0000000..31a8d6a --- /dev/null +++ b/.sqlx/query-3ef4d74f3ec50dad4478d955ab3356f132ab331c234ba25fe8052930c7e3932a.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id = $1 AND (id < $3) ORDER BY id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Uuid", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "3ef4d74f3ec50dad4478d955ab3356f132ab331c234ba25fe8052930c7e3932a" +} diff --git a/.sqlx/query-3fee400c88184e10b41d7426fa38d46be39abf3b70d47504d3cc8bd7cbd6e60f.json b/.sqlx/query-3fee400c88184e10b41d7426fa38d46be39abf3b70d47504d3cc8bd7cbd6e60f.json new file mode 100644 index 0000000..93590c8 --- /dev/null +++ b/.sqlx/query-3fee400c88184e10b41d7426fa38d46be39abf3b70d47504d3cc8bd7cbd6e60f.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id IS NULL ORDER BY id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "3fee400c88184e10b41d7426fa38d46be39abf3b70d47504d3cc8bd7cbd6e60f" +} diff --git a/.sqlx/query-50d66c46a9a2826cd35897c23bea2225f0cc95e33c7e27b61a5f1c7332e0e7ea.json b/.sqlx/query-50d66c46a9a2826cd35897c23bea2225f0cc95e33c7e27b61a5f1c7332e0e7ea.json new file mode 100644 index 0000000..e9ebc2a --- /dev/null +++ b/.sqlx/query-50d66c46a9a2826cd35897c23bea2225f0cc95e33c7e27b61a5f1c7332e0e7ea.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id IS NULL ORDER BY created_at DESC, id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "50d66c46a9a2826cd35897c23bea2225f0cc95e33c7e27b61a5f1c7332e0e7ea" +} diff --git a/.sqlx/query-533222dfe7b242664de50ebc3e3dec97e75c00eca81070a360ed4c0868ce16f4.json b/.sqlx/query-533222dfe7b242664de50ebc3e3dec97e75c00eca81070a360ed4c0868ce16f4.json new file mode 100644 index 0000000..9e1c119 --- /dev/null +++ b/.sqlx/query-533222dfe7b242664de50ebc3e3dec97e75c00eca81070a360ed4c0868ce16f4.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs ORDER BY created_at ASC, id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "533222dfe7b242664de50ebc3e3dec97e75c00eca81070a360ed4c0868ce16f4" +} diff --git a/.sqlx/query-5860e9d9edd87605d27746fec7c1a0fc396026d53252b9ee819285dbdcacce7a.json b/.sqlx/query-5860e9d9edd87605d27746fec7c1a0fc396026d53252b9ee819285dbdcacce7a.json new file mode 100644 index 0000000..b8fdb18 --- /dev/null +++ b/.sqlx/query-5860e9d9edd87605d27746fec7c1a0fc396026d53252b9ee819285dbdcacce7a.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs ORDER BY id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "5860e9d9edd87605d27746fec7c1a0fc396026d53252b9ee819285dbdcacce7a" +} diff --git a/.sqlx/query-5aa4b2ee5d6abafafe10f5a69e2a186c2ce521371fb8c9af22bb2090d8fd20f6.json b/.sqlx/query-5aa4b2ee5d6abafafe10f5a69e2a186c2ce521371fb8c9af22bb2090d8fd20f6.json new file mode 100644 index 0000000..68a9920 --- /dev/null +++ b/.sqlx/query-5aa4b2ee5d6abafafe10f5a69e2a186c2ce521371fb8c9af22bb2090d8fd20f6.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE (parent_job_id IS NOT DISTINCT FROM $1) ORDER BY id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "5aa4b2ee5d6abafafe10f5a69e2a186c2ce521371fb8c9af22bb2090d8fd20f6" +} diff --git a/.sqlx/query-63584671582f74d8e0e94dc6d009d5268c1b364c1466e652448d259ffcd2ae0e.json b/.sqlx/query-63584671582f74d8e0e94dc6d009d5268c1b364c1466e652448d259ffcd2ae0e.json new file mode 100644 index 0000000..128190f --- /dev/null +++ b/.sqlx/query-63584671582f74d8e0e94dc6d009d5268c1b364c1466e652448d259ffcd2ae0e.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id IS NULL AND (id > $2) ORDER BY id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Uuid", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "63584671582f74d8e0e94dc6d009d5268c1b364c1466e652448d259ffcd2ae0e" +} diff --git a/.sqlx/query-64fe1d1157518286bfe6715fd801433fce8b24941fdeb3a6b21483da15a6a740.json b/.sqlx/query-64fe1d1157518286bfe6715fd801433fce8b24941fdeb3a6b21483da15a6a740.json new file mode 100644 index 0000000..354810c --- /dev/null +++ b/.sqlx/query-64fe1d1157518286bfe6715fd801433fce8b24941fdeb3a6b21483da15a6a740.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE (parent_job_id IS NOT DISTINCT FROM $1) AND (id > $3) ORDER BY id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Uuid", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "64fe1d1157518286bfe6715fd801433fce8b24941fdeb3a6b21483da15a6a740" +} diff --git a/.sqlx/query-7c8588ea942cbbec63ab285e249db0896d73e99ff0fd79ee8722aad8b8eb270a.json b/.sqlx/query-7c8588ea942cbbec63ab285e249db0896d73e99ff0fd79ee8722aad8b8eb270a.json new file mode 100644 index 0000000..dc14843 --- /dev/null +++ b/.sqlx/query-7c8588ea942cbbec63ab285e249db0896d73e99ff0fd79ee8722aad8b8eb270a.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id = $1 ORDER BY created_at DESC, id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "7c8588ea942cbbec63ab285e249db0896d73e99ff0fd79ee8722aad8b8eb270a" +} diff --git a/.sqlx/query-81887fbc64e8ccef717d43375364771863177d8ef271c35b2678749915d600e8.json b/.sqlx/query-81887fbc64e8ccef717d43375364771863177d8ef271c35b2678749915d600e8.json new file mode 100644 index 0000000..8b451c9 --- /dev/null +++ b/.sqlx/query-81887fbc64e8ccef717d43375364771863177d8ef271c35b2678749915d600e8.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs ORDER BY id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "81887fbc64e8ccef717d43375364771863177d8ef271c35b2678749915d600e8" +} diff --git a/.sqlx/query-8af8274b6a1b333466884bb7fdadca6480f03ccd18e19a98ae4b5f288d94420e.json b/.sqlx/query-8af8274b6a1b333466884bb7fdadca6480f03ccd18e19a98ae4b5f288d94420e.json new file mode 100644 index 0000000..9fd92f3 --- /dev/null +++ b/.sqlx/query-8af8274b6a1b333466884bb7fdadca6480f03ccd18e19a98ae4b5f288d94420e.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id = $1 ORDER BY created_at ASC, id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "8af8274b6a1b333466884bb7fdadca6480f03ccd18e19a98ae4b5f288d94420e" +} diff --git a/.sqlx/query-06782c2a9a3872817f3c7e755f88153c3d624d569c4b36e02c6c56aa0f4cadce.json b/.sqlx/query-8f1a9fd2da2971d8b976bd8624c2d86e49fb36abbc157c49a7aa777a9df34d1c.json similarity index 66% rename from .sqlx/query-06782c2a9a3872817f3c7e755f88153c3d624d569c4b36e02c6c56aa0f4cadce.json rename to .sqlx/query-8f1a9fd2da2971d8b976bd8624c2d86e49fb36abbc157c49a7aa777a9df34d1c.json index 03d414c..290906c 100644 --- a/.sqlx/query-06782c2a9a3872817f3c7e755f88153c3d624d569c4b36e02c6c56aa0f4cadce.json +++ b/.sqlx/query-8f1a9fd2da2971d8b976bd8624c2d86e49fb36abbc157c49a7aa777a9df34d1c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE (NOT $1 OR parent_job_id IS NOT DISTINCT FROM $2) AND (COALESCE((created_at, id) > ($5, $4), $4 IS NULL)) ORDER BY created_at ASC, id ASC LIMIT $3) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $6 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE (parent_job_id IS NOT DISTINCT FROM $1) AND (id < $3) ORDER BY id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -36,11 +36,9 @@ ], "parameters": { "Left": [ - "Bool", "Uuid", "Int8", "Uuid", - "Timestamptz", "Bool" ] }, @@ -53,5 +51,5 @@ null ] }, - "hash": "06782c2a9a3872817f3c7e755f88153c3d624d569c4b36e02c6c56aa0f4cadce" + "hash": "8f1a9fd2da2971d8b976bd8624c2d86e49fb36abbc157c49a7aa777a9df34d1c" } diff --git a/.sqlx/query-cf1191d9fdc24657a53f94d88e566f1a9ecc23294abccefb962da4d513242330.json b/.sqlx/query-a50cd2f7e45d25ea26cf03e794187cc69530c7da5899ade29662463376e37a12.json similarity index 67% rename from .sqlx/query-cf1191d9fdc24657a53f94d88e566f1a9ecc23294abccefb962da4d513242330.json rename to .sqlx/query-a50cd2f7e45d25ea26cf03e794187cc69530c7da5899ade29662463376e37a12.json index 1387f98..d06a8f6 100644 --- a/.sqlx/query-cf1191d9fdc24657a53f94d88e566f1a9ecc23294abccefb962da4d513242330.json +++ b/.sqlx/query-a50cd2f7e45d25ea26cf03e794187cc69530c7da5899ade29662463376e37a12.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE (COALESCE((created_at, id) > ($3, $2), $2 IS NULL)) ORDER BY created_at ASC, id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE ((created_at, id) < ($3, $2)) ORDER BY created_at DESC, id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -51,5 +51,5 @@ null ] }, - "hash": "cf1191d9fdc24657a53f94d88e566f1a9ecc23294abccefb962da4d513242330" + "hash": "a50cd2f7e45d25ea26cf03e794187cc69530c7da5899ade29662463376e37a12" } diff --git a/.sqlx/query-c3aa3c1f2000628eff11fe7d15157ef774a9b8958dcd4a06445a3e12145507be.json b/.sqlx/query-c3aa3c1f2000628eff11fe7d15157ef774a9b8958dcd4a06445a3e12145507be.json new file mode 100644 index 0000000..a1550f3 --- /dev/null +++ b/.sqlx/query-c3aa3c1f2000628eff11fe7d15157ef774a9b8958dcd4a06445a3e12145507be.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id IS NULL AND (id < $2) ORDER BY id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Uuid", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "c3aa3c1f2000628eff11fe7d15157ef774a9b8958dcd4a06445a3e12145507be" +} diff --git a/.sqlx/query-cdc860cdcdd6c6363738fe1ee633b6ded43749cf57479731a74675555272d651.json b/.sqlx/query-cdc860cdcdd6c6363738fe1ee633b6ded43749cf57479731a74675555272d651.json new file mode 100644 index 0000000..76a082b --- /dev/null +++ b/.sqlx/query-cdc860cdcdd6c6363738fe1ee633b6ded43749cf57479731a74675555272d651.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE ((created_at, id) > ($3, $2)) ORDER BY created_at ASC, id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Uuid", + "Timestamptz", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "cdc860cdcdd6c6363738fe1ee633b6ded43749cf57479731a74675555272d651" +} diff --git a/.sqlx/query-1bd93f153e7fb4df4099245f8b9c7b002a536689c4cd3deac46fbaa2049d3e57.json b/.sqlx/query-d3374902f70eecddf6e971e607399cdb5b8725fa938bb2ff3dc0f4783b668e23.json similarity index 69% rename from .sqlx/query-1bd93f153e7fb4df4099245f8b9c7b002a536689c4cd3deac46fbaa2049d3e57.json rename to .sqlx/query-d3374902f70eecddf6e971e607399cdb5b8725fa938bb2ff3dc0f4783b668e23.json index fa4e401..792fb2f 100644 --- a/.sqlx/query-1bd93f153e7fb4df4099245f8b9c7b002a536689c4cd3deac46fbaa2049d3e57.json +++ b/.sqlx/query-d3374902f70eecddf6e971e607399cdb5b8725fa938bb2ff3dc0f4783b668e23.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE ((parent_job_id IS NOT DISTINCT FROM $1) AND (COALESCE(id < $3, true))) ORDER BY id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "query": "WITH entities AS (SELECT created_at, id FROM jobs ORDER BY created_at DESC, id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -36,9 +36,7 @@ ], "parameters": { "Left": [ - "Uuid", "Int8", - "Uuid", "Bool" ] }, @@ -51,5 +49,5 @@ null ] }, - "hash": "1bd93f153e7fb4df4099245f8b9c7b002a536689c4cd3deac46fbaa2049d3e57" + "hash": "d3374902f70eecddf6e971e607399cdb5b8725fa938bb2ff3dc0f4783b668e23" } diff --git a/.sqlx/query-856084afe2b90810d2b781575fab6ef75e592e56566ee2d7aa30002a9b6543c1.json b/.sqlx/query-db4686f04337853acb023d92122af89786fffef49569fab2ec3645199041aeb7.json similarity index 65% rename from .sqlx/query-856084afe2b90810d2b781575fab6ef75e592e56566ee2d7aa30002a9b6543c1.json rename to .sqlx/query-db4686f04337853acb023d92122af89786fffef49569fab2ec3645199041aeb7.json index 5de6cf3..e56e6bb 100644 --- a/.sqlx/query-856084afe2b90810d2b781575fab6ef75e592e56566ee2d7aa30002a9b6543c1.json +++ b/.sqlx/query-db4686f04337853acb023d92122af89786fffef49569fab2ec3645199041aeb7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT id FROM jobs WHERE (COALESCE(id < $2, true)) ORDER BY id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "query": "WITH entities AS (SELECT id FROM jobs WHERE (id > $2) ORDER BY id ASC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", "describe": { "columns": [ { @@ -50,5 +50,5 @@ null ] }, - "hash": "856084afe2b90810d2b781575fab6ef75e592e56566ee2d7aa30002a9b6543c1" + "hash": "db4686f04337853acb023d92122af89786fffef49569fab2ec3645199041aeb7" } diff --git a/.sqlx/query-dcfa7970fc4b7524f11da40e44714cf382ad982782e25938393283b16a780a53.json b/.sqlx/query-dcfa7970fc4b7524f11da40e44714cf382ad982782e25938393283b16a780a53.json new file mode 100644 index 0000000..83890ba --- /dev/null +++ b/.sqlx/query-dcfa7970fc4b7524f11da40e44714cf382ad982782e25938393283b16a780a53.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id IS NULL AND ((created_at, id) < ($3, $2)) ORDER BY created_at DESC, id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at desc, i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Int8", + "Uuid", + "Timestamptz", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "dcfa7970fc4b7524f11da40e44714cf382ad982782e25938393283b16a780a53" +} diff --git a/.sqlx/query-e56f4e1cc0eeaf5fa88cfc5b87802a45ae0c461cd551264c2979d3636cb34ce1.json b/.sqlx/query-e56f4e1cc0eeaf5fa88cfc5b87802a45ae0c461cd551264c2979d3636cb34ce1.json deleted file mode 100644 index fbd5178..0000000 --- a/.sqlx/query-e56f4e1cc0eeaf5fa88cfc5b87802a45ae0c461cd551264c2979d3636cb34ce1.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT id FROM jobs WHERE (NOT $1 OR parent_job_id IS NOT DISTINCT FROM $2) AND (COALESCE(id > $4, true)) ORDER BY id ASC LIMIT $3) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $5 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "entity_id: Repo__Id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "sequence", - "type_info": "Int4" - }, - { - "ordinal": 2, - "name": "event", - "type_info": "Jsonb" - }, - { - "ordinal": 3, - "name": "context: es_entity::ContextData", - "type_info": "Jsonb" - }, - { - "ordinal": 4, - "name": "recorded_at", - "type_info": "Timestamptz" - }, - { - "ordinal": 5, - "name": "forgettable_payload?", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Bool", - "Uuid", - "Int8", - "Uuid", - "Bool" - ] - }, - "nullable": [ - false, - false, - false, - null, - false, - null - ] - }, - "hash": "e56f4e1cc0eeaf5fa88cfc5b87802a45ae0c461cd551264c2979d3636cb34ce1" -} diff --git a/.sqlx/query-94d8e0a05add12514a46639610d196545e7f9955573ef82605c592c42ffffe43.json b/.sqlx/query-ea08856e59e2fe0b306d77b5fa678c3523ae4fbede420afff7ec1b3a5cbf23ba.json similarity index 69% rename from .sqlx/query-94d8e0a05add12514a46639610d196545e7f9955573ef82605c592c42ffffe43.json rename to .sqlx/query-ea08856e59e2fe0b306d77b5fa678c3523ae4fbede420afff7ec1b3a5cbf23ba.json index e4cc11c..3083dc8 100644 --- a/.sqlx/query-94d8e0a05add12514a46639610d196545e7f9955573ef82605c592c42ffffe43.json +++ b/.sqlx/query-ea08856e59e2fe0b306d77b5fa678c3523ae4fbede420afff7ec1b3a5cbf23ba.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT parent_job_id, id FROM jobs WHERE ((parent_job_id IS NOT DISTINCT FROM $1) AND (COALESCE(id > $3, true))) ORDER BY id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $4 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id IS NULL ORDER BY id DESC LIMIT $1) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $2 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", "describe": { "columns": [ { @@ -36,9 +36,7 @@ ], "parameters": { "Left": [ - "Uuid", "Int8", - "Uuid", "Bool" ] }, @@ -51,5 +49,5 @@ null ] }, - "hash": "94d8e0a05add12514a46639610d196545e7f9955573ef82605c592c42ffffe43" + "hash": "ea08856e59e2fe0b306d77b5fa678c3523ae4fbede420afff7ec1b3a5cbf23ba" } diff --git a/.sqlx/query-0dad7db8269bd70ab8aa34d7b586873f4cbdf8a38b028e3a5a42008085978829.json b/.sqlx/query-ea52f4bcf8eb818c3d3377f6b8c55e9a581289cb372451993e93bf1eac6e8b4e.json similarity index 74% rename from .sqlx/query-0dad7db8269bd70ab8aa34d7b586873f4cbdf8a38b028e3a5a42008085978829.json rename to .sqlx/query-ea52f4bcf8eb818c3d3377f6b8c55e9a581289cb372451993e93bf1eac6e8b4e.json index 9f0e985..2900ee8 100644 --- a/.sqlx/query-0dad7db8269bd70ab8aa34d7b586873f4cbdf8a38b028e3a5a42008085978829.json +++ b/.sqlx/query-ea52f4bcf8eb818c3d3377f6b8c55e9a581289cb372451993e93bf1eac6e8b4e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH entities AS (SELECT id FROM jobs WHERE (NOT $1 OR parent_job_id IS NOT DISTINCT FROM $2) AND (COALESCE(id < $4, true)) ORDER BY id DESC LIMIT $3) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $5 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "query": "WITH entities AS (SELECT created_at, id FROM jobs WHERE parent_job_id = $1 AND ((created_at, id) > ($4, $3)) ORDER BY created_at ASC, id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $5 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.created_at asc, i.id asc, i.id, e.sequence", "describe": { "columns": [ { @@ -36,10 +36,10 @@ ], "parameters": { "Left": [ - "Bool", "Uuid", "Int8", "Uuid", + "Timestamptz", "Bool" ] }, @@ -52,5 +52,5 @@ null ] }, - "hash": "0dad7db8269bd70ab8aa34d7b586873f4cbdf8a38b028e3a5a42008085978829" + "hash": "ea52f4bcf8eb818c3d3377f6b8c55e9a581289cb372451993e93bf1eac6e8b4e" } diff --git a/.sqlx/query-f480b4c5eb45e98b3ec8ebfd4b2b8d1b4f8779e9211d5426f9b1a5b3781666e0.json b/.sqlx/query-f480b4c5eb45e98b3ec8ebfd4b2b8d1b4f8779e9211d5426f9b1a5b3781666e0.json new file mode 100644 index 0000000..37129c7 --- /dev/null +++ b/.sqlx/query-f480b4c5eb45e98b3ec8ebfd4b2b8d1b4f8779e9211d5426f9b1a5b3781666e0.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id = $1 ORDER BY id DESC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id desc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "f480b4c5eb45e98b3ec8ebfd4b2b8d1b4f8779e9211d5426f9b1a5b3781666e0" +} diff --git a/.sqlx/query-fe374474b228125b77c0c9276d7813264b6b01b13a55121d0b5c7f00b38e1026.json b/.sqlx/query-fe374474b228125b77c0c9276d7813264b6b01b13a55121d0b5c7f00b38e1026.json new file mode 100644 index 0000000..f9f4be7 --- /dev/null +++ b/.sqlx/query-fe374474b228125b77c0c9276d7813264b6b01b13a55121d0b5c7f00b38e1026.json @@ -0,0 +1,54 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH entities AS (SELECT id FROM jobs WHERE parent_job_id = $1 ORDER BY id ASC LIMIT $2) SELECT i.id AS \"entity_id: Repo__Id\", e.sequence, e.event, CASE WHEN $3 THEN e.context ELSE NULL::jsonb END as \"context: es_entity::ContextData\", e.recorded_at, NULL::jsonb as \"forgettable_payload?\" FROM entities i JOIN job_events e ON i.id = e.id ORDER BY i.id asc, i.id, e.sequence", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "entity_id: Repo__Id", + "type_info": "Uuid" + }, + { + "ordinal": 1, + "name": "sequence", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "event", + "type_info": "Jsonb" + }, + { + "ordinal": 3, + "name": "context: es_entity::ContextData", + "type_info": "Jsonb" + }, + { + "ordinal": 4, + "name": "recorded_at", + "type_info": "Timestamptz" + }, + { + "ordinal": 5, + "name": "forgettable_payload?", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Uuid", + "Int8", + "Bool" + ] + }, + "nullable": [ + false, + false, + false, + null, + false, + null + ] + }, + "hash": "fe374474b228125b77c0c9276d7813264b6b01b13a55121d0b5c7f00b38e1026" +} diff --git a/Cargo.lock b/Cargo.lock index 29c48dd..f1489b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,9 +452,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "es-entity" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ee4087e4fa197a04214b70f0d7552923d87728d9a35be2b2f3d887def30f3b" +checksum = "b77820b8cd056d9f3831d49f00bb01fe80216e7c8e04f6e39be29c11d2d1fcd2" dependencies = [ "async-stream", "chrono", @@ -480,9 +480,9 @@ dependencies = [ [[package]] name = "es-entity-macros" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfead6a9b91b8c4d9c97b5b0eeb378399bc7c963b2024d92961120d954318ae3" +checksum = "d894eda6b6c6bf66bce9b984af814e51c65366261fdd131c509c23849980914b" dependencies = [ "convert_case", "darling 0.23.0", diff --git a/Cargo.toml b/Cargo.toml index 8c988e5..bfa3e07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ anyhow = { workspace = true } [workspace.dependencies] -es-entity = "0.11.6" +es-entity = "0.11.9" anyhow = "1.0" async-trait = "0.1"