Source code for tortoise.contrib.postgres.functions
frompypika.termsimportFunction,Term
[docs]classToTsVector(Function):# type: ignore""" to to_tsvector function """def__init__(self,field:Term):super(ToTsVector,self).__init__("TO_TSVECTOR",field)
[docs]classToTsQuery(Function):# type: ignore""" to_tsquery function """def__init__(self,field:Term):super(ToTsQuery,self).__init__("TO_TSQUERY",field)
[docs]classPlainToTsQuery(Function):# type: ignore""" plainto_tsquery function """def__init__(self,field:Term):super(PlainToTsQuery,self).__init__("PLAINTO_TSQUERY",field)
[docs]classRandom(Function):# type: ignore""" Generate random number. :samp:`Random()` """def__init__(self,alias=None)->None:super().__init__("RANDOM",alias=alias)