File: test_solr.py

package info (click to toggle)
sqlglot 28.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,816 kB
  • sloc: python: 86,744; sql: 22,739; makefile: 48
file content (12 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from sqlglot import exp
from tests.dialects.test_dialect import Validator


class TestSolr(Validator):
    dialect = "solr"

    def test_solr(self):
        self.validate_identity("SELECT `default`.column FROM t")
        self.failureException('SELECT "column" FROM t')
        self.validate_identity("SELECT column FROM t WHERE column = 'val'")
        self.validate_identity("a || b", "a OR b").assert_is(exp.Or)