#1 2018-01-29 12:10:44

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

[not-an-issue]No logs for a wrong 'CREATE INDEX' with expression

Hi ab,

When TSQLRestServerDB executes a wrong SQL like the following, it will failed without any errors being logged to the log file.

CREATE INDEX CustomerRelatedDocList ON Customer (
    JSON_EXTRACT(WrongFieldName, "$.RecordID") ASC,
    JSON_EXTRACT(WrongFieldName, "$.RecordClassName") 
);

For reference, the correct SQL is as following (and can be executed without issue):

CREATE INDEX CustomerRelatedDocList ON Customer (
    JSON_EXTRACT(RelatedDocList, "$.RecordID") ASC,
    JSON_EXTRACT(RelatedDocList, "$.RecordClassName") 
);

RelatedDocList is defined as a TObjectList which is persisted in JSON format.

I'm using this rev: https://github.com/synopse/mORMot/commi … 76b9b42046 (updated SQLite3 engine to latest version 3.22.0)

Last edited by edwinsn (2018-01-29 14:53:15)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2018-01-29 13:25:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: [not-an-issue]No logs for a wrong 'CREATE INDEX' with expression

This is a Sqlite3 limitation, I'm afraid, not a framework problem...

Offline

#3 2018-01-29 14:53:26

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: [not-an-issue]No logs for a wrong 'CREATE INDEX' with expression

@ab,

OK, I got it.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB