MCPcopy Create free account
hub / github.com/google-research/language / make_sql_span

Function make_sql_span

language/xsp/data_preprocessing/abstract_sql.py:104–114  ·  view source on GitHub ↗

SqlSpan constructor where only one argument should be non-None.

(sql_token=None,
                  value_literal=None,
                  column=None,
                  table_name=None,
                  nested_statement=None)

Source from the content-addressed store, hash-verified

102
103
104def 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
117def _get_tables(tokens):

Callers 5

_add_column_spansFunction · 0.85
replace_from_clauseFunction · 0.85
restore_from_clauseFunction · 0.85

Calls 1

ParseErrorClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…