Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for functions/procedures #728

Open
orellabac opened this issue Nov 6, 2020 · 4 comments
Open

Support for functions/procedures #728

orellabac opened this issue Nov 6, 2020 · 4 comments
Labels
feature request New issue opened using "Feature request" template

Comments

@orellabac
Copy link

I think it will be great to have the option to show functions and procedures.

I tried for example to extend a driver using a query like this:


const fetchFunctions: IBaseQueries['fetchFunctions'] = queryFactory`
SELECT
  '${ContextValue.FUNCTION}' as type,
  FUNCTION_NAME AS name,
  FUNCTION_NAME AS label,
  FUNCTION_NAME || '(' || ARGUMENT_SIGNATURE || ')' AS detail,
  FUNCTION_SCHEMA AS schema,
  CURRENT_DATABASE() AS database,
  ARGUMENT_SIGNATURE AS signature,
  DATA_TYPE AS "resultType",
  NULL AS args,
  NULL AS "argsNames",
  FUNCTION_DEFINITION AS source,
  'function' as "iconName",
  '${ContextValue.NO_CHILD}' as "childType"
FROM
    INFORMATION_SCHEMA.FUNCTIONS
WHERE
  FUNCTION_SCHEMA = '${p => p.schema}'
ORDER BY name
;`;

It seems to get some date but shows nothing so probably I am doing something wrong.

But there is not support at all for stored procedures.

Is it possible to do that ?

@orellabac orellabac added the feature request New issue opened using "Feature request" template label Nov 6, 2020
@michaellifly
Copy link

any update?

@orellabac
Copy link
Author

Not yet. It seems to be something in the SQLTools extensions. They have some condition that validates the file language to be .sql and the language is changed to snowscriptjs for syntax coloring. So I think the issue requires a fix on the SQLTools side but I am still looking into it to see if there is any workaround I can do.

@jankap
Copy link

jankap commented Oct 11, 2021

Would love to see stored procedures supported too. Any way we can help with that?

@bombillazo
Copy link
Contributor

I second this, for PostgreSQL as well! Being able to at least view the source and update of a function is an important feature in a DB Client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template
Projects
None yet
Development

No branches or pull requests

4 participants