mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 12:35:59 +00:00
feat: stored procedures and funciton parameters support for mssql
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
module.exports = `
|
||||
SELECT
|
||||
o.object_id as parentObjectId,
|
||||
p.object_id AS parameterObjectId,
|
||||
CASE
|
||||
WHEN p.name IS NULL OR LTRIM(RTRIM(p.name)) = '' THEN
|
||||
'@Output'
|
||||
ELSE
|
||||
p.name
|
||||
END AS pureName,
|
||||
TYPE_NAME(p.user_type_id) AS dataType,
|
||||
p.max_length AS charMaxLength,
|
||||
p.precision AS precision,
|
||||
p.scale AS scale,
|
||||
p.is_output AS isOutputParameter,
|
||||
p.parameter_id AS parameterIndex
|
||||
FROM
|
||||
sys.objects o
|
||||
JOIN
|
||||
sys.parameters p ON o.object_id = p.object_id
|
||||
WHERE
|
||||
o.type IN ('FN', 'IF', 'TF')
|
||||
ORDER BY
|
||||
p.object_id,
|
||||
p.parameter_id;
|
||||
`;
|
||||
Reference in New Issue
Block a user