getSQLFunctionSignature returns the signature for a SQL function
(funcName string)
| 1416 | |
| 1417 | // getSQLFunctionSignature returns the signature for a SQL function |
| 1418 | func getSQLFunctionSignature(funcName string) *SignatureInformation { |
| 1419 | signatures := map[string]*SignatureInformation{ |
| 1420 | "COUNT": { |
| 1421 | Label: "COUNT(expression)", |
| 1422 | Documentation: "Returns the number of rows that match a specified condition.", |
| 1423 | Parameters: []ParameterInformation{ |
| 1424 | {Label: "expression", Documentation: "Column or expression to count. Use * for all rows."}, |
| 1425 | }, |
| 1426 | }, |
| 1427 | "SUM": { |
| 1428 | Label: "SUM(expression)", |
| 1429 | Documentation: "Returns the sum of all values in the expression.", |
| 1430 | Parameters: []ParameterInformation{ |
| 1431 | {Label: "expression", Documentation: "Numeric column or expression to sum."}, |
| 1432 | }, |
| 1433 | }, |
| 1434 | "AVG": { |
| 1435 | Label: "AVG(expression)", |
| 1436 | Documentation: "Returns the average value of the expression.", |
| 1437 | Parameters: []ParameterInformation{ |
| 1438 | {Label: "expression", Documentation: "Numeric column or expression to average."}, |
| 1439 | }, |
| 1440 | }, |
| 1441 | "MIN": { |
| 1442 | Label: "MIN(expression)", |
| 1443 | Documentation: "Returns the minimum value in the expression.", |
| 1444 | Parameters: []ParameterInformation{ |
| 1445 | {Label: "expression", Documentation: "Column or expression to find minimum value."}, |
| 1446 | }, |
| 1447 | }, |
| 1448 | "MAX": { |
| 1449 | Label: "MAX(expression)", |
| 1450 | Documentation: "Returns the maximum value in the expression.", |
| 1451 | Parameters: []ParameterInformation{ |
| 1452 | {Label: "expression", Documentation: "Column or expression to find maximum value."}, |
| 1453 | }, |
| 1454 | }, |
| 1455 | "COALESCE": { |
| 1456 | Label: "COALESCE(value1, value2, ...)", |
| 1457 | Documentation: "Returns the first non-null value in the list.", |
| 1458 | Parameters: []ParameterInformation{ |
| 1459 | {Label: "value1", Documentation: "First value to check."}, |
| 1460 | {Label: "value2, ...", Documentation: "Additional values to check."}, |
| 1461 | }, |
| 1462 | }, |
| 1463 | "NULLIF": { |
| 1464 | Label: "NULLIF(expression1, expression2)", |
| 1465 | Documentation: "Returns NULL if expression1 equals expression2, otherwise returns expression1.", |
| 1466 | Parameters: []ParameterInformation{ |
| 1467 | {Label: "expression1", Documentation: "Value to return if not equal."}, |
| 1468 | {Label: "expression2", Documentation: "Value to compare against."}, |
| 1469 | }, |
| 1470 | }, |
| 1471 | "CAST": { |
| 1472 | Label: "CAST(expression AS type)", |
| 1473 | Documentation: "Converts an expression to a specified data type.", |
| 1474 | Parameters: []ParameterInformation{ |
| 1475 | {Label: "expression", Documentation: "Value to convert."}, |
no outgoing calls