SqlSpan constructor where only one argument should be non-None.
(sql_token=None,
value_literal=None,
column=None,
table_name=None,
nested_statement=None)
| 102 | |
| 103 | |
| 104 | def make_sql_span(sql_token=None, |
| 105 | value_literal=None, |
| 106 | column=None, |
| 107 | table_name=None, |
| 108 | nested_statement=None): |
| 109 | """SqlSpan constructor where only one argument should be non-None.""" |
| 110 | |
| 111 | args = [sql_token, value_literal, column, table_name, nested_statement] |
| 112 | if sum(arg is not None for arg in args) != 1: |
| 113 | raise ParseError('Only one argument should be set: %s' % args) |
| 114 | return SqlSpan(*args) |
| 115 | |
| 116 | |
| 117 | def _get_tables(tokens): |
no test coverage detected
searching dependent graphs…