File: create_function.yml

package info (click to toggle)
sqlfluff 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,000 kB
  • sloc: python: 106,131; sql: 34,188; makefile: 52; sh: 8
file content (44 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# YML test files are auto-generated from SQL files and should not be edited by
# hand. To help enforce this, the "hash" field in the file must match a hash
# computed by SQLFluff when running the tests. Please run
# `python test/generate_parse_fixture_yml.py`  to generate them after adding or
# altering SQL files.
_hash: 6bfe60aac773580df9cb9b10feae284a254229e90369885d79d7f030aa47006c
file:
  statement:
    create_function_statement:
    - keyword: CREATE
    - keyword: OR
    - keyword: REPLACE
    - keyword: FUNCTION
    - function_name:
        naked_identifier: public
        dot: .
        function_name_identifier: iif
    - function_parameter_list:
        bracketed:
        - start_bracket: (
        - parameter: condition
        - data_type:
            keyword: BOOLEAN
        - comma: ','
        - parameter: true_result
        - data_type:
            keyword: ANYELEMENT
        - comma: ','
        - parameter: false_result
        - data_type:
            keyword: ANYELEMENT
        - end_bracket: )
    - keyword: RETURNS
    - data_type:
        keyword: ANYELEMENT
    - function_definition:
      - keyword: STABLE
      - keyword: AS
      - quoted_literal: "$$\n    if condition:\n        return true_result\n    return\
          \ false_result\n$$"
      - language_clause:
          keyword: LANGUAGE
          naked_identifier: plpythonu
  statement_terminator: ;