#1 Re: mORMot Framework » New Statics for mORMot » 2021-03-30 06:42:15

AOG

And where can I read, what change in fpc was done?

Dunno. Its a FPC compiler error. Hard to isolate. Easy to work around.

#3 Re: mORMot Framework » mORMot 2 in Good Shape » 2021-03-21 12:14:23

AOG

I have compiled some sqlite3 Android libs v3.35.0000
Use them as you see fit. Greetings.
https://github.com/LongDirtyAnimAlf/fpc … 350000.zip

#4 Re: mORMot Framework » mORMot2 examples » 2021-03-07 06:37:02

AOG

Try this:

if not Assigned(OnMatch) or
    (not (Assigned(KeyCompare) or
    Assigned(ValueCompare))) then
  exit;

#5 Re: mORMot Framework » Mqtt server based on mormot's network,give some suggestion pls » 2021-02-07 06:43:05

AOG

Hi songshuang,
Thanks for sharing your code. Looks very interesting and welcome. A mORMot based MQTT server (and client) is very much appreciated (by me) !

#6 Re: mORMot Framework » mORMot 2 in Good Shape » 2021-01-19 09:27:50

AOG

Hi Ab,
At the moment, mORMot2 does not run on arm. It gives a "property has no RTTI"-error. Naturally, this can be solved.
The question however:
Is mORMot2 suitable and mature now to perform deep debugging these errors ? If yes, I will dig into this and start porting my apps towards mORMot2.
Thanks.

#7 Re: mORMot Framework » SQLite as a document database » 2020-12-27 08:45:33

AOG

I would (also) welcome the implementation of sqlite3-json features. Trying to be future-proof, all my complex objects are stored as json in sqlite3. Would be good to have dedicated json-features for speed-reasons.

#8 Re: mORMot Framework » DDD object flattening » 2020-11-15 19:59:40

AOG

Thanks very much. Will look into this. I guess this will serve my needs.

#9 mORMot Framework » DDD object flattening » 2020-11-15 09:22:10

AOG
Replies: 2

Hi Ab,
I have a (feature) request (if needed). My projects now use DDD. For storing product information.

TProduct = class(TSynAutoCreateFields)
  protected
    fProductCode : RawUTF8;
    fDetail      : TDetails;
  published
    property ProductCode  : RawUTF8 read fProductCode write fProductCode;
    property Detail       : TDetails read fDetail;
end;
TDetails = class(TPersistent)
...
end;

The TDetails are flattened by default. But I would like to have them more compact as JSON in the database file.
I succeeded in doing so by disabling the "pilSubClassesFlattening" options in mORMotDDD.pas (and adding an autocreated TDetails-field in the record and with RegisterClassForJSON for TDetails).
Could this be made info an options to flatten by default or not in special cases ? Or can this already be accomplished ?
Thanks.

Edit:
Perhaps an idea: scan the ORM instance for a field with the same signature (and name) as the field in the aggregate itself.

#10 Re: mORMot Framework » mORMot 2.0 status? » 2020-11-06 06:28:26

AOG

Teasing presentations !! Clear explanations also. Looking forward to mORMot2.

#11 Re: mORMot Framework » GraphQL versus REST » 2020-11-01 20:27:55

AOG

Thanks Ab, I have completely overlooked the links you provided.
These provide enough info.
For me, REST is enough. And DDD makes all abstractions worthwile.
The question was based on the fact that Pimcore (a nice PIM) will change its api towards GraphQL. And I am using the mORMot to provide Pimcore some realtime data.

#12 mORMot Framework » GraphQL versus REST » 2020-11-01 11:58:00

AOG
Replies: 2

Hello Ab,
Hello All,

There is an ongoing discussion about GraphQL being better (more efficient) than REST.
I would value the opinions of the mORMot boss and users ?

Thanks, Alfred.

#13 Re: mORMot Framework » TestSQL3.lpi build fails on GNU/Linux x64 » 2020-06-25 19:42:11

AOG

Happy coding and speeding ... :-) ... thanks !

#14 Re: mORMot Framework » TestSQL3.lpi build fails on GNU/Linux x64 » 2020-06-25 18:20:09

AOG

Some (better) improvements might be expected from the advices that are shown here:
https://www.sqlite.org/compile.html

#15 Re: mORMot Framework » TestSQL3.lpi build fails on GNU/Linux x64 » 2020-06-25 15:16:41

AOG

I do not expect much speed improvements at -O2.
I only expect improved hardware and os compatibility.

#17 Re: mORMot Framework » TestSQL3.lpi build fails on GNU/Linux x64 » 2020-06-25 08:24:03

AOG

Fpcupdeluxe is not needed for the standalone tools. Just download and unpack somewhere. And adjust the sqlite3 build-script to point towards the right locations.

#18 Re: mORMot Framework » TestSQL3.lpi build fails on GNU/Linux x64 » 2020-06-25 08:18:46

AOG

Hi Ab,

Just added relocatable binutils and gcc for Linux x64 meant to run on Linux x64 itself.
These utils might help you in building the static sqlite3 on Linux itself, without dependencies on glibc.

https://github.com/LongDirtyAnimAlf/fpc … nuxx64.zip

#19 Re: Free Pascal Compiler » Using Lazarus DBGrid with mORMot. » 2020-06-11 19:09:11

AOG

Project := TSQLProject.CreateAndFillPrepare(DataBase,'Place your SQL here !',s);
Is the above not suitable ?

#20 Re: Free Pascal Compiler » Using Lazarus DBGrid with mORMot. » 2020-06-11 17:46:57

AOG

Here you go.
https://github.com/LongDirtyAnimAlf/mOR … LExtra.pas
Please feel free to use and ask any question.

I will take a closer look, but AFAIK all the rest is vanilla mORMot latest of a couple of weeks ago. Compiled with FPC fixes 3.2

#21 Re: Free Pascal Compiler » Using Lazarus DBGrid with mORMot. » 2020-06-11 09:06:21

AOG

I am using the mORMot for filling DBGrids with Lazarus.
The TBufDataset is very suitable. It is used in SynDBMidasVCL.
Works very well.

ProjectDataset:=TSQLPropsToClientDataSet(Self,TSQLProject.RecordProps);
ProjectDataset.Active:=False;
ProjectDataset.Fields.Clear;
ProjectDataset.CreateDataset;
ProjectDataset.Active:=True;
DataSourceProject.DataSet:=ProjectDataset; //<----- this datasource is connected with a DBGrid
ProjectDataset.IndexFieldNames:='Code';
with TSQLProject.RecordProps do s:='ID,'+CSVFromFieldBits(FieldBitsFromExcludingCSV('Summary'));
Project := TSQLProject.CreateAndFillPrepare(DataBase,'',s);
T:=Project.FillTable;
if Assigned(T) then
begin
    ProjectDataset.DisableControls;
    ToClientDataSet(TClientDataSet(ProjectDataset),T);
    ProjectDataset.First;
    ProjectDataset.EnableControls;
end;
Project.Free;
ProjectDataset.BeforeScroll:=@DatasetBeforeScroll;
ProjectDataset.AfterScroll:=@DatasetAfterScroll;

#22 Re: mORMot Framework » 10.4 sydney issues » 2020-06-05 15:21:35

AOG

We could fork sqlite3 ... ;-)

#24 Re: mORMot Framework » The mORMot on Android » 2020-05-04 17:26:40

AOG

@emk.
This issue has been discussed more often on this list: the need for offline (but encrypted) functionality on mobile.
I would be very interested in an automagical (user transparent) scheme to have offline changes uploaded to online and an auto-switch-over from off- to on- to off- with updates and encrypted local storage.

#26 Re: mORMot Framework » The mORMot on Android » 2020-05-04 13:43:20

AOG

Hi Ab,
I was looking at the mORMot2 code you posted above.
Regarding mORMot and testing on different platform, I would like to ask you a favor.

To get TestSQL3 running on Android, I needed to catch the output to console (STD).
Normally, Android has no (visible) console.
In mORMot1, TestSQL3, you use a text to write towards console.
I would like to ask you to make this a variable (global or setable) text to be able to catch it. Can be a file, can be a stringlist-redirect like I have used for the Android sample. That way, mORMot2 can put its TestSQL3 output (or other console output) in any text, being std by default.
Thanks, Alfred.

#27 Re: mORMot Framework » The mORMot on Android » 2020-05-03 16:33:19

AOG

This is a pure Pascal native Android app. No Java, so no easy views. That is why I used Asphyre and GLES.
With normal Java, you can create views and more easily.
But for testing, this was the most easy way to do.
For all the rest, I would advice LAMW.

#28 Re: mORMot Framework » The mORMot on Android » 2020-05-03 07:33:43

AOG

Sources are uploaded. They contain a special version of the mORMot.

https://github.com/LongDirtyAnimAlf/AsphyrePXL

Tha latest (pre-) release of fpcupdeluxe can install these sources AND perform some magic to set all path correct.

https://github.com/LongDirtyAnimAlf/fpc … tag/1.6.8o

Edit:
The module name to install/use is "mORMotPXL".

#29 Re: mORMot Framework » The mORMot on Android » 2020-04-28 18:26:51

AOG

I am a bit busy the next couple of days. But I will publish all.
In general, the LAMW framework can be used to make Android apps based on Java.
The Castle Game Engine can be used for iOS apps.
For this test however, I have used the Asphyre PXL framework.
Will update on its use.

#30 Re: mORMot Framework » The mORMot on Android » 2020-04-28 09:25:10

AOG

Uploaded universal apk. It has armv7 and arm64. This is needed for the app-store.

https://github.com/LongDirtyAnimAlf/fpc … -debug.apk

#31 Re: mORMot Framework » The mORMot on Android » 2020-04-28 06:50:42

AOG

Solved the remaining issues.
New uploaded (see link) apk now gives all greens on my phone.

Edit:
This apk was created with FPC (and Lazarus). Not a single line of java was needed. Its a pure native Android app, written in Pascal.

#32 Re: mORMot Framework » The mORMot on Android » 2020-04-27 20:16:27

AOG

On my phone, I have 76 failures. Of which 74 similar from one test.

#33 mORMot Framework » The mORMot on Android » 2020-04-27 18:58:40

AOG
Replies: 24

For anybody interested in running the mORMot on your Android phone.

https://github.com/LongDirtyAnimAlf/fpc … -debug.apk

This is TestSQL3 designed to run on Android through OpenGLES.
Its for armv7, so should run on any phone.
Enjoy. Feedback welcome as ever.

#34 Re: Free Pascal Compiler » FPC 3.2 rc1 » 2020-04-17 04:52:09

AOG

Some time ago, Maciej went through a severe personal tragedy. That has kept him away from active involvement with NewPascal.

He was also (a bit) frustrated with the amount of friction he encountered with his work for FPC.
I must agree: its hard to change anything in FPC. Bugfixes are accepted, but acceptance of (simple) changes can even take years, if ever.

But he is still around. I expect him back sooner or later.
And NewPascal is definitely on hold.

#36 Re: mORMot Framework » ORMSelectAll('Name_Last LIKE ?',[aName+'%'],(aName='')) does not work » 2020-04-12 14:52:11

AOG

But isn't this a limit to this framework? I've thought that it should be transparent to any storage? Or am I wrong?

Its not a limit. Its intentional.
It makes no sense to write a SQL engine if there are so many available out there. And sqlite3 is a perfect candidate for (static) embedding).
The TSQLRestStorageInMemory has its (dedicated) uses. If you know its limitations, you know when to use it.

#38 Re: mORMot Framework » How to put TDataModule in DLL with Lazarus » 2020-04-10 17:48:10

AOG

That is good to know. Thanks.
On Android, this is already standard.

#39 Re: mORMot Framework » SynCommons Exception Class External:SIGSEGV » 2020-04-08 10:57:15

AOG

If you are using latest trunk, you need to enable this also:
{$define FPC_PROVIDE_ATTR_TABLE}

#40 Re: mORMot Framework » How to put TDataModule in DLL with Lazarus » 2020-04-08 10:18:52

AOG

Put -Cg- in the project options.
Or try -Cg (without trailing -) also ... ;-)

#41 Re: Free Pascal Compiler » FPC 3.2 rc1 » 2020-04-05 13:50:09

AOG

Same experience here !!
Also on ARM(64) targets.

#42 Re: Free Pascal Compiler » FPC 3.2 rc1 » 2020-04-05 03:59:10

AOG

Agreed. FPC 3.2 is the way to go. If all goes well, this will be a very good and stable release.

For sure, compatibility with actual trunk MUST be guaranteed. Trunk is the future of FPC.
But I do not expect any mORMot major breaking changes going into trunk this year.

And, any working Lazarus will do.
Personally, I use Lazarus trunk, due to cocoa and QT5 updates.

#43 Re: Free Pascal Compiler » FPC 3.2 rc1 » 2020-04-03 16:57:33

AOG

Fixes builds the mORMot 100% perfect on my systems.
Regarding the client tests:
I always change the default http port from 8888 to 8848. Mainly due to 8888 often being used by other processes.

#44 Re: mORMot Framework » DDD with Blobs » 2020-04-03 12:10:54

AOG

@mpv
I agree. That is why the data is being split between the two databases with separate servers.
I have no other choice but to store documents inside the separate database. It must be transportable and local.

#45 Re: mORMot Framework » DDD with Blobs » 2020-04-03 12:08:53

AOG

Thanks for this quick fix !
FYI, I will not use batch-transfer for Blobs. The document database is a separate database, synchronized by using RemoteDataCreate.
However, the same business logic is used to access both databases. That is the reason this was a needed feature in this business case.

#46 mORMot Framework » DDD with Blobs » 2020-04-02 16:22:48

AOG
Replies: 4

Hi Ab,

For a rather big project, I have switched towards using DDD.
This project also wants to store documents, spreadsheets and photos into the [DDD] database.
However, DDD does not allow for TSQLRawBlob to be stored.

Cause (inside mORMotDDD):

soInsert: ndx := fBatch.Add(fCurrentORMInstance,true,fFactory.fAggregateID<>nil);

I would like to propose to add an option to allow for this:

soInsert: ndx := fBatch.Add(fCurrentORMInstance,true,fFactory.fAggregateID<>nil,ALL_FIELDS);

AFAIK, at this moment, TSQLRawBlob cannot be reached or handled by DDD.
I guess it cannot do harm to enable all fields for DDD.
Its the choice of the user (and me) to use TSQLRawBlob , for good reasons I hope ... ;-)

#47 Re: mORMot Framework » How to put TDataModule in DLL with Lazarus » 2020-03-29 06:22:53

AOG

Try this, perhaps it helps.
TDataModule1.CreateNew(nil);

#48 Re: mORMot Framework » Make the SynDB logging for the TSQLDBStatement descendants the same » 2020-03-22 11:37:54

AOG

Perhaps I would get rid of the high-level cache in mORMot2, and only use provider-level dedicated cache...

Perhaps a very good idea. Its hard to make good use of cache in certain scenarios.

#50 Re: mORMot Framework » Revision 2.x of the framework » 2020-03-06 15:24:37

AOG

Hi Ab,

I would like to ask you not to include the static binaries into the repo.
Binaries are not handled very well. And will blow-up the whole repo with every commit.

Please use the releases for the sqlite3 binaries. With appropriate naming.
Also, old binary releases are very easily accessible this way.

Thanks.

Board footer

Powered by FluxBB