Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(24)  |  Call(19)  |  Derive(2)  |  Import(3)

src/d/j/django-orm-extensions-3.0b3/django_orm/postgresql/geometric/expressions.py   django-orm-extensions(Download)
# -*- coding: utf-8 -*-
 
from django_orm.core.sql import SqlExpression
from . import functions
 
class SimpleExpression(SqlExpression):
    def overlaps(self, value):
        return SqlExpression(self.field, "&&", value)
 
    def is_strictly_left_of(self, value):
        return SqlExpression(self.field, "<<", value)
 
    def is_strictly_right_of(self, value):
        return SqlExpression(self.field, ">>", value)

src/d/j/django-orm-extensions-3.0b3/django_orm/postgresql/hstore/expressions.py   django-orm-extensions(Download)
# -*- coding: utf-8 -*-
 
from django_orm.core.sql import SqlExpression
 
class HstoreExpression(object):
    def contains(self, value):
        if isinstance(value, dict):
            expression = SqlExpression(
                self.field, "@>", value
            )
        elif isinstance(value, (list,tuple)):
            expression = SqlExpression(
                self.field, "?&", value
        elif isinstance(value, basestring):
            expression = SqlExpression(
                self.field, "?", value
            )
        else:
    def exact(self, value):
        return SqlExpression(
            self.field, "=", value
        )
 

src/d/j/django-orm-extensions-3.0b3/django_orm/postgresql/expressions.py   django-orm-extensions(Download)
# -*- coding: utf-8 -*-
 
from django_orm.core.sql import SqlExpression
from django_orm.utils import remove_diacritic
 
from .functions import Unaccent
 
class UnaccentExpression(SqlExpression):