#1 2015-04-29 07:29:06

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

ZeosDB

Hi,

I'm working right now on an Android Project, Client Server. And I have to use a data base. I wanted to know if the Zeos library is working with FPC 3.1.1/mORMot on Linux ? Because I have some compilation errors with ZCompatiblity for example : ZCompatibility.pas Error: Some fields coming before " " were not initialized

PS: I also checked the Zeos version, I have the trunk version.

Edit 2 : Compilation with Delphi : OK but codetyphon not working !

Edit 3 : My problem is coming when I include SynDBZeos. It loads different units and the compilation returns errors. My objective is to use only PostgreSQL
           Normally, if you create a sample application and include SynDBZeos, it's not working... (with FPC of course)

Thank's

Last edited by Thomas-Acia (2015-04-29 08:56:23)


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#2 2015-04-29 09:26:49

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

Re: ZeosDB

We did not fully tested SynDBZeos with FPC yet.

Did you ask for support in the Zeos forums?

Offline

#3 2015-04-29 09:31:43

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

ab wrote:

We did not fully tested SynDBZeos with FPC yet.

Did you ask for support in the Zeos forums?

I'll ask them and I'll share the answer here.


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#4 2015-04-29 09:32:44

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

Re: ZeosDB

Zeos forums are usually very reactive.

Offline

#5 2015-04-29 11:21:48

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: ZeosDB

@Thomas-Acia,

Use the version:
Zeos7.2-beta branches_ testing_Revision 3619(3627):
http://svn.code.sf.net/p/zeoslib/code-0 … sting-7.2/

I have not encountered significant problems in all my tests:
http://zeoslib.sourceforge.net/viewtopi … 664#p38406

Michal

Offline

#6 2015-04-29 11:25:00

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

miab3 wrote:

@Thomas-Acia,

Use the version:
Zeos7.2-beta branches_ testing_Revision 3619(3627):
http://svn.code.sf.net/p/zeoslib/code-0 … sting-7.2/

I have not encountered significant problems in all my tests:
http://zeoslib.sourceforge.net/viewtopi … 664#p38406

Michal


Ok. Answer in 2h max !


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#7 2015-04-29 15:26:09

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

So, I finished all my tests.

To conclude :

Now it's working ! BUT even if I use your revision, I have the problem. So I decided to use the ZEOS library given with CodeTyphon and now it's working. So I don't know what the problem is, but now it's working.

If I can give a council to all users who have the same problem: Use the Zeos lib given with codetyphon (C:\codetyphon\typhon\components\pl_ZeosDBOx\source\*).


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#8 2015-04-29 16:22:15

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: ZeosDB

Update ZEOS in CodeTyphon involves replacing the contents from the "C:\codetyphon\typhon\components\pl_ZeosDBO\source\*"
on contents of the current Revision from directory "src\*" and rebuild of the entire CodeTyphon.

Michal

Last edited by miab3 (2015-04-29 16:23:07)

Offline

#9 2015-04-30 13:52:28

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

Syntaxe mode : Delphi was not activated...


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#10 2015-05-02 10:28:48

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: ZeosDB

From what I see CodeTyphon current version(5.30), release date 29-Apr-2015:
http://www.pilotlogic.com/sitejoom/inde … codetyphon
includes the latest version of ZEOS 7.2 beta r3619(r3627).

Michal

Last edited by miab3 (2015-05-02 10:29:54)

Offline

#11 2015-05-04 10:01:00

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

miab3 wrote:

From what I see CodeTyphon current version(5.30), release date 29-Apr-2015:
http://www.pilotlogic.com/sitejoom/inde … codetyphon
includes the latest version of ZEOS 7.2 beta r3619(r3627).

Michal

Yes. I rebuilt all with CodeTyphon this morning. I just tested the connection with a postgres server, it's working well with linux debian 7. (Windows too of course !)


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#12 2015-05-21 10:04:52

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

Hi,

I'm working on a new part of my projet. I just added RTTI to my server and now I'm trying to connect my server to PostgeSQL.

I used this

PropsPostgreSQL := TSQLDBZEOSConnectionProperties.Create(
   TSQLDBZEOSConnectionProperties.URI(dPostgreSQL,'localhost:5432'),
   'dbname','username','password');

And now my question is, how can I assign these properties ? Can I use a TZConnection or anything else ?


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#13 2015-05-21 10:48:28

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

Re: ZeosDB

No, using PropsPostgreSQL to define external tables is enough.
No need to maintain the connection by your own.
You may benefit of running the ORM process in a dedicated thread, to let resources be low.

See e.g. https://github.com/synopse/mORMot/blob/ … server.dpr

Offline

#14 2015-05-21 15:04:14

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

My connection is working well. But there's a problem in the framework.
When a schema contains a . in the name, mORMot doesn't generate the " " around the name.


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#15 2015-05-21 15:06:15

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

Re: ZeosDB

A schema with . in it?

I just hate RDBMS specificities.
wink

Offline

#16 2015-05-21 15:18:36

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

ab wrote:

A schema with . in it?

I just hate RDBMS specificities.
wink


Yes with . in it ! big_smile


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#17 2015-05-21 15:25:52

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

And with uppercase too smile


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#18 2015-05-28 07:20:19

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

Hi,

How can I do a ILIKE pgsql with the ORM ? "Like" is working but not iLike

Thank's !


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#19 2015-05-28 08:03:12

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

Re: ZeosDB

ILIKE is not supported, since it is a PostgreSQL specific extension, not handled by Sqlite3 for instance.

Since ILIKE is not recognized by the framework, the statement is passed to the virtual SQLite3 table engine, which does not support ILIKE either...

IMHO the only possibility is to run the SQL query directly on PostgreSQL, using the SynDB connection properties.
ILIKE use falls into the category of optimization for a single SQL engine, so is not handled by the ORM.

Offline

#20 2015-05-29 14:45:38

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

ab wrote:

ILIKE is not supported, since it is a PostgreSQL specific extension, not handled by Sqlite3 for instance.

Since ILIKE is not recognized by the framework, the statement is passed to the virtual SQLite3 table engine, which does not support ILIKE either...

IMHO the only possibility is to run the SQL query directly on PostgreSQL, using the SynDB connection properties.
ILIKE use falls into the category of optimization for a single SQL engine, so is not handled by the ORM.


Yes but the objective is to use the ORM anyway ..
So I use the Uppercase method.

And to return to the RDBMS "specificities", I think the caracters " . " or "UPPERCASE" are not just a specificitiy. It's a standard...

Thank you ! roll


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#21 2015-05-29 14:48:21

Thomas-Acia
Member
From: Metz (France)
Registered: 2015-04-16
Posts: 79

Re: ZeosDB

By the way, my project is ended. I have a client and a server mORMot with a SQL query (ZEOS + PGSQL).

It's working on Linux AND Windows but not with an Android device yet. I'm working on it. If I have good news, I'll come back ! big_smile


Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits

Offline

#22 2015-05-29 20:07:05

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

Re: ZeosDB

Nice!

8)

Offline

Board footer

Powered by FluxBB