sql#
- swordfish.sql(sql, *, vars=None)#
Executes a SQL query.
- 参数:
sql (str) -- The SQL query to be executed.
vars (dict, optional) -- A dictionary of variables to be involved in the query. Default is None.
- 返回:
The result of executing the SQL query.
- 返回类型:
示例
>>> import swordfish as sf >>> import swordfish.function as F >>> sf.sql("SELECT * FROM table(1..10 as a) WHERE Func(a) > 0", ... vars={'Func': F.abs})