dataservices-api/server/extension/expected/10_helper_test.out
2015-11-10 15:36:57 +01:00

16 lines
667 B
Plaintext

-- Create a conf table
CREATE TABLE conf (key TEXT PRIMARY KEY, values_json TEXT NOT NULL);
INSERT INTO conf VALUES ('cds', '{"Manolo Escobar": {"El Limonero":"En stock", "Viva el vino":"Sin stock"}}');
-- Test key retrieval
SELECT cdb_geocoder_server._get_conf('cds');
_get_conf
----------------------------------------------------------------------------
{"Manolo Escobar": {"El Limonero":"En stock", "Viva el vino":"Sin stock"}}
(1 row)
-- Test no key exception
SELECT cdb_geocoder_server._get_conf('no existe');
ERROR: Missing key 'no existe' in conf table
-- Drop conf table
DROP TABLE conf;