示例#1
0
def compile_timegrain_expression(element: TimestampExpression,
                                 compiler: Compiled, **kwargs: Any) -> str:
    return element.name.replace("{col}",
                                compiler.process(element.col, **kwargs))
示例#2
0
def generate_mview_create_expression(element: CreateMaterializedViewExpression,
                                     compiler: Compiled, **kwargs: Any) -> str:
    return 'CREATE OR REPLACE MATERIALIZED VIEW %s AS %s' % (
        element.name, compiler.process(element.selectable, literal_binds=True))