#1 2017-10-02 13:45:50

JD
Member
Registered: 2015-08-20
Posts: 118

Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

Lazarus (NewPascal & Lazarus 1.8RC4/fpc 3.0.2) can no longer create SQLite3 databases using TSQLRestServerDB.Create. I am using mORMot 1.18.3680 FTS3

While it works OK in my Delphi 2010, I had to use the work around below and create the REST server in memory when I switch to Lazarus. Lazarus used to be able to create SQLite3 databases so maybe some recent changes to mORMot are responsible for this failure.

  {$IFNDEF fpc}
    {$IFDEF SQLITE_DB_ON_DISK}
    DBServer := TSQLRestServerDB.Create(Model, DBNAME,{$IFDEF AUTHENTICATION}True{$ELSE}False{$ENDIF});
    {$ELSE}
    DBServer := TSQLRestServerDB.Create(Model, ':memory:',{$IFDEF AUTHENTICATION}True{$ELSE}False{$ENDIF});
    {$ENDIF}
    DBServer.CreateMissingTables;
  {$ELSE}
    DBServer := TSQLRestServerFullMemory.Create(TSQLModel.Create([], ROOT_NAME), 'atheme.json', False, {$IFDEF AUTHENTICATION}True{$ELSE}False{$ENDIF});
  {$ENDIF}

Apart from that issue everything is working fine in Lazarus; even my service based interfaces. I am amazed at how easy it is to create interfaces and I see that I no longer need to manually create and map URI REST commands. So my code will be much smaller as a result. I've decided to go full throttle with mORMot because of this.

Thanks a lot to Arnaud & the rest of the team. You are doing a wonderful job & I can't praise you enough.

JD

Last edited by JD (2017-10-02 14:22:16)

Offline

#2 2017-10-02 16:46:57

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

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

Did you try with the latest mORMot trunk revision, and latest .o files from sqlite3fpc.7z ?

Offline

#3 2017-10-03 21:54:12

JD
Member
Registered: 2015-08-20
Posts: 118

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

Hi there ab. I was using fpcupdeluxe to download mORMot so I tried the mORMotNightlyBuild for a change. While fpcupdeluxe fetches mORMot 1.18.3680 FTS3, the nightly build I got is mORMot 1.18.3857 FTS3!? So fpcupdeluxe is no longer in sync with the mORMot nightly builds.

Anyway I used Lazarus (NewPascal & also Lazarus 1.8RC4/fpc 3.0.2) to compile/run TestSQL3 and though all assertions were passed, some tests related to compression failed.

1.5 Compression:

! Compression - GZIP format
! Exception ESynZipException raised with message:
!  Error -5 during UnCompression process

In any case it looks like Lazarus can now create SQLite3 databases again.

By the way, I would like to inform you that I've also been using mORMot with ZEOS & PostgreSQL 9.5 and 9.6 with success. In the manual, you asked users to let you know of successful test cases with newer PostgreSQL releases.

So thanks a lot.

JD

Last edited by JD (2017-10-03 21:55:10)

Offline

#4 2017-10-04 04:32:31

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

Fpcupdeluxe presents you two mORMots:
the original one: mORMot
a special one: mORMotFPC

The latter was made to be able to use the mORMot during a period of heavy changes of FPC and the mORMot itself.
It has not been updates for a long time now: the original mORMot works flawless now with FPC on many systems.

So, just use the original mORMot.

Offline

#5 2017-10-04 08:39:44

JD
Member
Registered: 2015-08-20
Posts: 118

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

AOG wrote:

Fpcupdeluxe presents you two mORMots:
the original one: mORMot
a special one: mORMotFPC

The latter was made to be able to use the mORMot during a period of heavy changes of FPC and the mORMot itself.
It has not been updates for a long time now: the original mORMot works flawless now with FPC on many systems.

So, just use the original mORMot.

Noted! Thanks a lot DonAlfredo. I really admire the work you've done with fpcup since we (the Lazarus community) lost BigChimp who started it all. I'm also interested in how you use mORMot with OpenUI5 but that will be another discussion.

JD

Last edited by JD (2017-10-04 09:04:53)

Offline

#6 2017-10-05 06:36:30

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

About OpenUI5.
A bit abandoned by me. Its so heavy. Takes ages to load. And it has the looks of the 60's. Which is ok for me, because I am from the 60's, but not really suitable for modern times.

Having said that.

I would be very interested in a ongoing discussion about java frameworks to be used with the mORMot.
It could even be a separate forum topic, due to its importance IMHO.

Offline

#7 2017-10-05 09:55:32

JD
Member
Registered: 2015-08-20
Posts: 118

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

OK. I didn't know that about OpenUI5. Thanks for letting me know this. I'll look elsewhere.

I must confess the idea of a mORMot server working with different types of frontends is a holy grail for me because the server part is always the hardest to code IMHO. Once I can get that part settled. I want to be able to play around with different types of clients.

I took a look at a Hibernate + Apache Tomcat based backend for an application again yesterday. It just seemed too heavy and unwieldy. A finely tuned mORMot server (Linux/Windows) just seems to me more logical as a replacement. A seperate forum on such an topic will be the best because we all know that at enterprise level, Java EE (with Tomcat or Glassfish) is deeply entrenched. And that is where I want to go.

JD

Offline

#8 2017-10-05 11:49:46

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

My tuppence worth is that haven't found a javascript framework that's helpful. I prefer to code as much as possible by hand. Admittedly I do use jQuery and Bootstrap (by twitter) for a modern UI (don't much like dealing with css). There is also fuelux if you want some fancy controls like a datepicker.

Offline

#9 2017-10-05 13:29:10

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

OpenUI5 is oriented to enterprise, the development is very active and the UI tends to UX, it have 600+ components, routing, internalization, etc, builtin the framework but is big and not very easy. I have an eye on Google Polymer https://www.polymer-project.org/ and other eye on Vaadin elements based on Polymer https://vaadin.com/elements.

Best  regards.


Esteban

Offline

#10 2017-10-06 08:41:35

JD
Member
Registered: 2015-08-20
Posts: 118

Re: Lazarus can no longer create SQLite3 databases using TSQLRestServerDB

@esmondb

Thanks for the Fuel UX tip. I didn't know about that one. Just like you I dislike CSS. sad

@Esteban

I didn't know about Google Polymer, thanks for the tip. Vaadin has always been an option. Their work looks good even if it is not free. smile

Last edited by JD (2017-10-06 08:44:24)

Offline

Board footer

Powered by FluxBB