synopse/mORMot

Retrieve gets multiple records

leus opened this issue · 1 comments

leus commented

According to the code (shortened for brevity):

   /// get a member from a SQL statement
    // [...]
    // - Execute 'SELECT * FROM TableName WHERE SQLWhere LIMIT 1' SQL Statememt
    // [...]
    function Retrieve(const SQLWhere: RawUTF8; Value: TSQLRecord;
      const aCustomFieldsCSV: RawUTF8=''): boolean; overload; virtual;

In the log files, I observe no "limit" clause. The method still works fine (I get the first record) but I worry a little bit about performance (there may be thousands of matching records).

20201212 15325432 SQL   	mORMotSQLite3.TSQLRestServerDB(0540a4a0) 203us returned 4 rows as 479 B SELECT ID,Sucursal,Terminal,Fecha,Folio,Total,Disponible,TrackId FROM StorageBoleta WHERE Disponible is NULL and Sucursal is NULL and Terminal is NULL

Is this by design?

Do not create directly issues here.
This is not a place for discussion.
Use the synopse.info/forum instead.