Skip to main content
query_one(sql, sql_params=[], sql_opts=)[source]

Execute a SQL query that returns only one row.

Parameters

sql (str) –

The SQL query to run

sql_params (list of native types) –

The SQL parameters that will be substituted for tokens (e.g. 11 2)

sql_opts (dict) –

The options for SQL execution, matching the options passed to GPUdb.execute_sql(). Defaults to None.

Returns

The returned row or None.