You are not logged in.
I do not expect much speed improvements at -O2.
I only expect improved hardware and os compatibility.
And Linux i386 utilities for Linux x64 added. Perhaps this works also.
https://github.com/LongDirtyAnimAlf/fpc … uxi386.zip
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.
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.
Project := TSQLProject.CreateAndFillPrepare(DataBase,'Place your SQL here !',s);
Is the above not suitable ?
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
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;We could fork sqlite3 ... ;-)
https://www.google.com/search?q=RS+10.4
What is RS 10.4 ... |-) ... ?
@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.
That is good ! Thank you !!
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.
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.
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".
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.
Uploaded universal apk. It has armv7 and arm64. This is needed for the app-store.
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.
On my phone, I have 76 failures. Of which 74 similar from one test.
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.
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.
+1 ... :-)
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.
I guess this storage engine does NOT support many SQL commands .
See:
https://synopse.info/files/html/api-1.1 … GEINMEMORY
That is good to know. Thanks.
On Android, this is already standard.
If you are using latest trunk, you need to enable this also:
{$define FPC_PROVIDE_ATTR_TABLE}
Put -Cg- in the project options.
Or try -Cg (without trailing -) also ... ;-)
Same experience here !!
Also on ARM(64) targets.
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.
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.
@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.
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.
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 ... ;-)
Try this, perhaps it helps.
TDataModule1.CreateNew(nil);
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.
Looking very good !!
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.
If you are on Windows or Intel Linux, you can already have a go at mORMot for current FPC trunk:
https://github.com/LongDirtyAnimAlf/mOR … /FPC_trunk
Ab has his own RPi's these days. So he can review by himself. But feedback is always welcome !
Today I will start working on getting mORMot to run with current FPC trunk on ARM.
I have completed the work on ARM.
The results (waiting for approval) are available at:
https://github.com/LongDirtyAnimAlf/mORMot
You are very welcome to tests these changes.
Sidenote:
Due to a compiler bug, use -O0 or -O1 for your project.
You may get some errors when using -O2
A pull-request is pending/created for some ARM changes.
Not yet perfect. Awaiting Ab response.
I am working on it ... but there still remains a single issue with dynamic arrays (rtti) that remains to be solved.
I can confirm the ARM issues ... its all about alignment.
Will look into the problems if my times allows for it.
Using latest trunk/trunk (by fpcupdeluxe) on Mac 10.14, the latest mORMot builds ok (TestSQL3.lpi).
And runs reasonable (except for "Service Oriented Architecture").
Hi Ab,
Another small (but very necessary) ARM fix. See comment.
Hi Ab,
I have created a pull with some changes for Linux ARM.
Please review !
Would you mind trying this.
In SynFPCTypInfo, line 182.
Replace
Dec(PtrUInt(result),SizeOf(pointer));
with
Dec(PtrUInt(result),2*SizeOf(pointer));
Confirmed.
Reproduceable on ARM.
Not reproduceable on Windows.
Will look into it.
Bump ... ;-)
Ps: I am using FPC trunk SVN 40491 and Lazarus trunk SVN 59757 win32 on win10