diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-27 04:01:47 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2023-03-27 04:01:47 +0900 |
commit | 6b8ab6fe190e9d8f42242ff1f57be8c28e9ca066 (patch) | |
tree | f608d39d4f2a33652aba5ebc00d705d1d14ccd88 /deploy/insert_transaction.sql | |
parent | 0a8e2a6e5dc7d75017f81d90ce1eb904280f1cba (diff) |
Delete insert/delete functions.
Diffstat (limited to 'deploy/insert_transaction.sql')
-rw-r--r-- | deploy/insert_transaction.sql | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/deploy/insert_transaction.sql b/deploy/insert_transaction.sql deleted file mode 100644 index eb5a38e..0000000 --- a/deploy/insert_transaction.sql +++ /dev/null @@ -1,24 +0,0 @@ --- Deploy kakeibo:insert_transaction to pg --- requires: schema --- requires: transactions - -BEGIN; - -CREATE OR REPLACE FUNCTION kakeibo.insert_transaction( - p_type_code INTEGER, - p_date DATE, - p_note TEXT -) RETURNS INTEGER AS $$ - DECLARE - inserted_id INTEGER; - BEGIN - INSERT INTO kakeibo.transactions ( - type_code, date, note - ) VALUES ( - p_type_code, p_date, p_note - ) RETURNING id INTO inserted_id; - RETURN inserted_id; - END; -$$ LANGUAGE plpgsql SECURITY DEFINER; - -COMMIT; |