Skip to content
mfragkoulis edited this page Mar 16, 2013 · 11 revisions

Table of Contents

Single-threaded vs multi-threaded operation

Users may start PiCO_QL in the same thread as the application (single-threaded) or in a separate thread. In the former case, PiCO_QL has to be compiled with PICO_QL_SINGLE_THREADED flag enabled. In the latter, it has to be compiled with PICO_QL_JOIN_THREADS compile flag enabled. In a happy day scenario pico_ql_serve() returns 101 (SQLITE_DONE).

Using PiCO QL

In production mode (PICO_QL_TEST not defined) PICO QL opens a port at localhost where the SWILL web interface is listening for query requests. Opening a browser at this address presents the query interface. The port number is provided as an argument to pico_ql_serve(). A usual port number is 8080.

SQL queries

SQL queries conform to ANSI SQL92 standard.

The rownum column

Virtual tables representing C++ collections or C multi-element data structures have an extra column, the rownum column. It indexes the position of an element inside a C++ collection or a C multi-element data structure. It can be projected in queries as usual and it can be selected using an equality constraint, e.g. WHERE rownum = 4 selects the fourth element. The rownum column, like the base column, is auto-generated. The rownum column is available with a C++ build ([cpp] argument to parser-generator).

Updating virtual table definitions

Users may update table definitions in the DSL then execute the generator, re-compile, and execute the application.

Clone this wiki locally