mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
Add unit tests mocha and sql
This commit is contained in:
26
tests/sql/otp.sql
Normal file
26
tests/sql/otp.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
---------------------------------------------------------------------------
|
||||
-- Listing
|
||||
--
|
||||
|
||||
-- List current database
|
||||
select current_database();
|
||||
|
||||
-- connect to the DB
|
||||
\c signalk
|
||||
|
||||
-- output display format
|
||||
\x on
|
||||
|
||||
--
|
||||
--
|
||||
\echo 'Count auth.accounts'
|
||||
SELECT count(*) from auth.accounts;
|
||||
\echo 'Settings auth.accounts'
|
||||
SELECT preferences->'email_notifications' as email_notifications from auth.accounts;
|
||||
SELECT preferences->'phone_notifications' as phone_notifications from auth.accounts;
|
||||
SELECT preferences->'telegram'->'chat'->'id' as telegram from auth.accounts;
|
||||
--SELECT preferences->'telegram'->'date' - INTERVAL 5 minutes from auth.accounts;
|
||||
|
||||
SELECT count(*)
|
||||
FROM auth.accounts
|
||||
WHERE preferences->'telegram'->'chat'->'id' is null;
|
Reference in New Issue
Block a user