def last(cls, num: int = 0) -> dict or list: if num == 0: return Expr(cls).operator.order(field_name_created_at, desc=True).findone() else: return Expr(cls).operator.order(field_name_created_at, desc=True).limit(num).find()
def take(cls, num: int = 0) -> dict or list: if num == 0: return Expr(cls).operator.findone() else: return Expr(cls).operator.limit(num).find()
def create(cls): return Expr(cls).operator.create()
def drop(cls): return Expr(cls).operator.drop()
def new(cls, **kwargs): return Expr(cls, **kwargs)
def add(cls, **kwargs): return Expr(cls, **kwargs).operator.insert()
def where(cls, **kwargs): return Expr(cls, **kwargs).operator