From 5d9dfcdcc3e6049942e35f9e3bfb831aace5f824 Mon Sep 17 00:00:00 2001 From: koljonen Date: Wed, 25 May 2016 13:01:57 +0200 Subject: Use pg_proc.proargmodes &c. instead of parsing arg_list Getting the parameters from proargnames, proallargtypes and proargmodes instead of from parsing the arg_list string simplifies FunctionMetadata quite a bit. I also made the ColumnMetadata for table/view columns use the same format for the type (i.e. regtype instead of typname). This means we now get join-condition suggestions for joining tables/views to functions, which didn't work before. --- tests/test_smart_completion_public_schema_only.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/test_smart_completion_public_schema_only.py') diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py index 9f78c49f..4e2048c7 100644 --- a/tests/test_smart_completion_public_schema_only.py +++ b/tests/test_smart_completion_public_schema_only.py @@ -13,10 +13,12 @@ metadata = { 'views': { 'user_emails': ['id', 'email']}, 'functions': [ - ['custom_func1', '', '', False, False, False], - ['custom_func2', '', '', False, False, False], - ['set_returning_func', '', 'TABLE (x INT, y INT)', - False, False, True]], + ['custom_func1', [''], [''], [''], '', False, False, + False], + ['custom_func2', [''], [''], [''], '', False, False, + False], + ['set_returning_func', ['x', 'y'], ['integer', 'integer'], + ['o', 'o'], '', False, False, True]], 'datatypes': ['custom_type1', 'custom_type2'], } -- cgit v1.2.3