From 9a8794031145cc547d243093adff0a0c3f217908 Mon Sep 17 00:00:00 2001 From: filipriec Date: Sat, 8 Mar 2025 11:55:49 +0100 Subject: [PATCH] docs to the pushing script into the db --- .../table_script/docs/push_script_to_db.txt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 server/src/table_script/docs/push_script_to_db.txt diff --git a/server/src/table_script/docs/push_script_to_db.txt b/server/src/table_script/docs/push_script_to_db.txt new file mode 100644 index 0000000..0a3b413 --- /dev/null +++ b/server/src/table_script/docs/push_script_to_db.txt @@ -0,0 +1,25 @@ +This is how we can push script into the database, now its stored after a push in postgres. +❯ grpcurl -plaintext -d '{ + "table_definition_id": 14, + "target_column": "fax", + "script": "(set! fax telefon)", + "description": "Copy telefon value to fax column" +}' localhost:50051 multieko2.table_script.TableScript/PostTableScript +{ + "id": "2" +} +❯ psql -U multi_psql_dev -d multi_rust_dev + +psql (17.2) +Type "help" for help. + +multi_rust_dev=> SELECT * FROM table_scripts; + + + id | table_definitions_id | target_column | script | source_tables | source_columns | description | created_at +----+----------------------+---------------+--------------------+---------------+----------------+----------------------------------+------------------------------- + 1 | 15 | fax | (set! fax telefon) | | | Copy telefon value to fax column | 2025-03-08 11:52:40.344114+01 + 2 | 14 | fax | (set! fax telefon) | | | Copy telefon value to fax column | 2025-03-08 11:54:05.664425+01 +(2 rows) + +(END)