src/sql/parse.py
def parse(cell, config):
    """Extract connection info and result variable from SQL
    
    Please don't add any more syntax requiring 
    special parsing.  
    Instead, add @arguments to SqlMagic.execute.
    
    We're grandfathering the 
    connection string and `<<` operator in.
    """

    result = {"connection": "", "sql": "", "result_var": None}

    pieces = cell.split(None, 3)
    if not pieces:
        return result
    result["connection"] = _connection_string(pieces[0], config)
    if result["connection"]:
        pieces.pop(0)
    if len(pieces) > 1 and pieces[1] == "<<":
        result["result_var"] = pieces.pop(0)
        pieces.pop(0)  # discard << operator
    result["sql"] = (" ".join(pieces)).strip()
    return result
Extract connection info and result variable from SQL
    
    Please don't add any more syntax requiring 
    special parsing.  
    Instead, add @arguments to SqlMagic.execute.
    
    We're grandfathering the 
    connection string and `<<` operator in.
    
Extract connection info and result variable from SQL
Please don't add any more syntax requiring
special parsing.
Instead, add @arguments to SqlMagic.execute.

We're grandfathering the
connection string and `<<` operator in.
Extract connection info and result variable from SQL Please don ' t add any more syntax requiring special parsing . Instead add @arguments to SqlMagic . execute . We ' re grandfathering the connection string and ` << ` operator in .
def parse(cell, config):
    result = {"connection": "", "sql": "", "result_var": None}
    pieces = cell.split(None, 3)
    if not pieces:
        return result
    result["connection"] = _connection_string(pieces[0], config)
    if result["connection"]:
        pieces.pop(0)
    if len(pieces) > 1 and pieces[1] == "<<":
        result["result_var"] = pieces.pop(0)
        pieces.pop(0)  
    result["sql"] = (" ".join(pieces)).strip()
    return result
def parse ( cell , config ) : result = { "connection" : "" , "sql" : "" , "result_var" : None } pieces = cell . split ( None , 3 ) if not pieces : return result result [ "connection" ] = _connection_string ( pieces [ 0 ] , config ) if result [ "connection" ] : pieces . pop ( 0 ) if len ( pieces ) > 1 and pieces [ 1 ] == "<<" : result [ "result_var" ] = pieces . pop ( 0 ) pieces . pop ( 0 ) result [ "sql" ] = ( " " . join ( pieces ) ) . strip ( ) return result
Extract connection info and result variable from SQL
Please don't add any more syntax requiring
special parsing.
Extract connection info and result variable from SQL Please don ' t add any more syntax requiring special parsing .
"""Extract connection info and result variable from SQL
    
    Please don't add any more syntax requiring 
    special parsing.  
    Instead, add @arguments to SqlMagic.execute.
    
    We're grandfathering the 
    connection string and `<<` operator in.
    """ # discard << operator
cell
config