See this page for source and working example https://github.com/Inflectra/rapise-powerpack/tree/master/QuerySQLite