Exemplo n.º 1
0
    def test__length__str(self):
        q = Q.select(fn.Length('ABC'))

        self.assertEqual("SELECT LENGTH('ABC')", str(q))
Exemplo n.º 2
0
    def test__length__field(self):
        q = Q.from_(self.t).select(fn.Length(self.t.foo))

        self.assertEqual("SELECT LENGTH(\"foo\") FROM \"abc\"", str(q))
Exemplo n.º 3
0
    def test__length__field(self):
        q = Q.from_(self.t).select(fn.Length(self.t.foo))

        self.assertEqual('SELECT LENGTH("foo") FROM "abc"', str(q))