def construct(self): query = "FOR " query += construct(self.target) query += " in " query += construct(self.iterator) query += " UNION " query += construct(self.generator) return query
def construct(self): query = "WITH" query += " __items := " query += construct(self.items) query += ", " query += "FOR __item IN {enumerate(__items)} " query += "UNION (SELECT __item.1 { @index := __item.0 })" return query
def construct(self): if self.with_block: query = construct(self.with_block, top_level=True) + " SELECT" else: query = "SELECT" query += " " + protected_construct(self.name) if self.selections: query += with_parens(", ".join(construct_sequence( self.selections)), combo="{}") if self.filters is not None: query += f" FILTER {construct(self.filters)}" if self.ordered is not None: query += f" ORDER BY {construct(self.ordered)}" if self.offset is not None: query += f" OFFSET {self.offset}" if self.limit is not None: query += f" LIMIT {self.limit}" return query
def construct(self): left = construct(self.left) right = construct(self.right) operator = construct(self.operator) return left + " " + operator + " " + right
def construct(self): key = construct(self.key) value = construct(self.value) operator = construct(self.operator) return key + " " + operator + " " + value
def construct(self): return construct(self.left) + " UNION " + construct(self.right)
def construct(self): query = construct(self.query) check = construct(self.operator) + " " + construct(self.argument) return query + with_parens(check, combo="[]")
def construct(self): return "not " + construct(self.value)
def construct(self): return construct(EdgeQLCast("uuid", repr(str(self.value.id))))
def construct(self): return construct(self.base) + "." + self.attr