Connects with conf table, implements helper and adds tests
This commit is contained in:
12
server/extension/sql/10_helper_test.sql
Normal file
12
server/extension/sql/10_helper_test.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Create a conf table
|
||||
CREATE TABLE conf (key TEXT NOT NULL PRIMARY KEY, values_json TEXT);
|
||||
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');
|
||||
|
||||
-- Test no key exception
|
||||
SELECT cdb_geocoder_server._get_conf('no existe');
|
||||
|
||||
-- Drop conf table
|
||||
DROP TABLE conf;
|
||||
Reference in New Issue
Block a user