(*, fields=(), alias: str = "s", where: dict = None)
return query
Compiles a S3 select "SQL" query
Compiles a S3 select "SQL" query
Compiles a S3 select SQL query
def compile_select(*, fields=(), alias: str = "s", where: dict = None) -> str:
    """
    Compiles a S3 select "SQL" query
    """
    columns = ", ".join([_compile_column(alias, f) for f in fields]) if fields else f"{alias}.*"
    query = f"SELECT {columns} FROM s3object {alias}"

    conditions = []
    if where:
        conditions += [_compile_condition(alias, k, v) for k, v in where.items()]
    if conditions:
        query += f" WHERE {' AND '.join(conditions)}"

    return query
def compile_select ( * , fields = ( ) , alias : str = "s" , where : dict = None ) -> str : columns = ", " . join ( [ _compile_column ( alias , f ) for f in fields ] ) if fields else f"{alias}.*" query = f"SELECT {columns} FROM s3object {alias}" conditions = [ ] if where : conditions += [ _compile_condition ( alias , k , v ) for k , v in where . items ( ) ] if conditions : query += f" WHERE {' AND '.join(conditions)}" return query