Example #1
0
def test_can_parse_sql_docstring_from_rendered_template():
    source = SQLQuerySource(
        '/* get data from {{table}} */ SELECT * FROM {{table}}')
    source.render({'table': 'my_table'})
    assert source.doc == ' get data from my_table '
Example #2
0
def test_can_parse_sql_docstring():
    source = SQLQuerySource('/* docstring */ SELECT * FROM customers')
    assert source.doc == ' docstring '
Example #3
0
 def _init_source(source, kwargs):
     # TODO: this shoule be a FileSource
     return SQLQuerySource(source, **kwargs)
Example #4
0
 def _init_source(source, kwargs):
     return SQLQuerySource(source, **kwargs)
Example #5
0
 def _init_source(self, source):
     # TODO: this shoule be a FileSource
     return SQLQuerySource(source)
Example #6
0
 def _init_source(self, source):
     return SQLQuerySource(source)