Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

4.6 KB
Raw Blame
- description: simple single statement
  input: "SELECT 1;"
  result:
    - text: "SELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 10
      range:
        start: 0
        end: 9
      empty: false
- description: multi-line statement
  input: "SELECT\n  1;"
  result:
    - text: "SELECT\n  1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 2
        column: 5
      range:
        start: 0
        end: 11
      empty: false
- description: multiple statements
  input: "SELECT 1;\nSELECT 2;"
  result:
    - text: "SELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 10
      range:
        start: 0
        end: 9
      empty: false
    - text: "\nSELECT 2;"
      baseline: 0
      start:
        line: 1
        column: 10
      end:
        line: 2
        column: 10
      range:
        start: 9
        end: 19
      empty: false
- description: multi-byte characters - Chinese
  input: "SELECT '\u4E2D\u6587';"
  result:
    - text: "SELECT '\u4E2D\u6587';"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 13
      range:
        start: 0
        end: 16
      empty: false
- description: multi-byte characters - emoji
  input: "SELECT '\U0001F389';"
  result:
    - text: "SELECT '\U0001F389';"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 12
      range:
        start: 0
        end: 14
      empty: false
- description: multi-byte on second line
  input: "SELECT\n  '\u4E2D\u6587';"
  result:
    - text: "SELECT\n  '\u4E2D\u6587';"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 2
        column: 8
      range:
        start: 0
        end: 18
      empty: false
- description: multiple statements with multi-byte on separate lines
  input: "SELECT '\u4E2D';\nSELECT '\u6587';"
  result:
    - text: "SELECT '\u4E2D';"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 12
      range:
        start: 0
        end: 13
      empty: false
    - text: "\nSELECT '\u6587';"
      baseline: 0
      start:
        line: 1
        column: 12
      end:
        line: 2
        column: 12
      range:
        start: 13
        end: 27
      empty: false
- description: 'position semantic: leading newlines'
  input: "\n\nSELECT 1;"
  result:
    - text: "\n\nSELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 3
        column: 10
      range:
        start: 0
        end: 11
      empty: false
- description: 'position semantic: leading spaces and newlines'
  input: "\n  \n  SELECT 1;"
  result:
    - text: "\n  \n  SELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 3
        column: 12
      range:
        start: 0
        end: 15
      empty: false
- description: 'position semantic: multi-statement with leading whitespace'
  input: "SELECT 1;\n\n  SELECT 2;"
  result:
    - text: "SELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 10
      range:
        start: 0
        end: 9
      empty: false
    - text: "\n\n  SELECT 2;"
      baseline: 0
      start:
        line: 1
        column: 10
      end:
        line: 3
        column: 12
      range:
        start: 9
        end: 22
      empty: false
- description: 'CRLF: multi-line without semicolon'
  input: "select col_a,count(col_b)\r\nfrom tbl\r\ngroup by col_a"
  result:
    - text: "select col_a,count(col_b)\r\nfrom tbl\r\ngroup by col_a"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 3
        column: 15
      range:
        start: 0
        end: 51
      empty: false
- description: 'CRLF: multiple statements'
  input: "SELECT 1;\r\nSELECT 2;"
  result:
    - text: "SELECT 1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 1
        column: 10
      range:
        start: 0
        end: 9
      empty: false
    - text: "\r\nSELECT 2;"
      baseline: 0
      start:
        line: 1
        column: 10
      end:
        line: 2
        column: 10
      range:
        start: 9
        end: 20
      empty: false
- description: 'CRLF: single statement with semicolon'
  input: "SELECT\r\n  1;"
  result:
    - text: "SELECT\r\n  1;"
      baseline: 0
      start:
        line: 1
        column: 1
      end:
        line: 2
        column: 5
      range:
        start: 0
        end: 12
      empty: false