#1 mORMot 2 » consider uWebsockets/uSockets as the fallback option? » 2023-06-12 04:21:40

zuoluoq
Replies: 1

Hi Ab,

https://github.com/uNetworking/uWebSockets

Currently the open source project uWebsockets(relay on uSockets) is widely used,which is written in C/C++ with greate performance,official author provides nodejs lib,
can you consider to integerate it(C/C++ lib interfaces) as the fallback option?
I know you've written the raw socket api as the fallback api crossing OS for http.sys is invalid not in MS OS.

#2 mORMot 2 » D7 compile mormot.db.rad.unidac.pas error » 2023-05-28 15:49:56

zuoluoq
Replies: 1

sync from https://github.com/synopse/mORMot2/issues/188


const
/// UniDAC provider names corresponding to mormot.db.sql recognized SQL engines
UNIDAC_PROVIDER: array[dOracle..high(TSqlDBDefinition)] of RawUtf8 = (
'Oracle', 'SQL Server', 'Access', 'MySQL', 'SQLite', 'InterBase',
'NexusDB', 'PostgreSQL', 'DB2', '');

[Error] mormot.db.rad.unidac.pas(171): Number of elements differs from declaration.

I checked,
dInformix,
dMariaDB names are missing in the arrary.
currently the dInformix is mapping to '',but dMariaDB is mapping to None.

and why is the dINformix setted as ''?

#3 mORMot 1 » mORMotUILogin pas Unit causes Access violation in dll » 2017-09-14 09:15:09

zuoluoq
Replies: 0

Hi ab,
mORMotUILogin pas Unit causes Access violation at address 4005F50 in moudle rtl70.bpl,
after launching it through exe host and then close the form,
I build a VCL winform in dll with "Build with runtime packages" checked.
I just use it in use clause but do nothing,but the error occurred.
Can you tell me the reason or maybe a bug,you can fix it.

#5 mORMot 1 » TAutoFree clause memory leak in for loop » 2017-09-11 23:13:59

zuoluoq
Replies: 2

Hi ab,
It seems like that,I find the memory leak for the Class named TAutoFree.
when I use the TAutoFree.Create(xxx,XXXClass.Create) in a procedure or a function within a loop code,it will be a memory leak reported by FastMM4.
I encapsulated an internal procedure/function within a procedure or a function,and invoke it within a loop,for example,

function TFrmHost.LoadNetworkConfigFileAndConnectToServer: Boolean;
var
  index, retryCount: Integer;
  errorMsg, hintMsg: string;
  encrptionKey, serverAddress, serverPort, wsPort, rootName: string;

  function CheckConnectToServer(): Boolean;
  var
    fClient: TSQLRestClientURI;
    fModel: TSQLModel;
  begin
    TAutoFree.One(fModel, TSQLModel.Create([], rootName));
    TAutoFree.One(fClient, TSQLHttpClient.Create(serverAddress, serverPort, fModel));
    Result := fClient.ServerTimeStampSynchronize;
  end;

begin
  Result := False;
  retryCount := 5;
  for index := 1 to retryCount do
  begin

    Result := CheckConnectToServer;
  
  end;
      // 尝试次数达到最多仍然无法联网
  if not Result then
  begin
    ShowError('无法联网,请检查网络连接或服务器是否正常启用,稍后再试!', '发生错误');
  end;
end;

if I use TAutoFree.Create(fModel, TSQLModel.Create([], rootName)); instead of TAutoFree.One(fModel, TSQLModel.Create([], rootName));
the FastMM4 will give a memory leak report for TAutoFree,but when I use TAutoFree.One(fModel, TSQLModel.Create([], rootName));
it is fine.
Can you tell me the reason ?

#6 Re: mORMot 1 » How to use direct database connection without any ORM functions » 2017-09-08 06:43:22

Hi,this is the reply from our author with e-mail.and I paste it here as ab wanna.

Please us the forum for such discussion.
It may help others.

1. For direct SQL statements, idea with mORMot is to always define a "persistence" service as an interface.
Then you may run the queries either via the ORM, or direclty using the SQLite3 engine, or the SynDB instance.
In SynDB, you have direct JSON output, and/or access via variant late binding, which is close to what you expect.

2. If you set "ForceID=true" for TSQLRest.Add, you can specify your own ID value.
See TSynUniqueIdentifierGenerator for a 64-bit integer ID generator.

#7 mORMot 1 » How to use direct database connection without any ORM functions » 2017-09-08 06:42:07

zuoluoq
Replies: 2

Hi dear author of mORMot,I'd like to get your sincere reply.
I have a question for your framework.
you know,your framework is designed full of ORM,some bit like the Hibernate in java,all OOP designed.
but sometimes we only need the db connection pool and transaction manager ,with writing the dynamic SQL by our-self,
especially for some complex query requirements.We think ORM without any SQL written or all SQL generated by framework is
not convenient sometimes and we need more time to learn it.
Maybe you can add the functions like Mybatis in Java,only for sql-mapping by all SQL  written by our-self.
actually,we don't need to change the Database frequently on production environment.SQL dialect - Database combination is normal.
An other question is ,in SQLRecord class ,the property ID,is designed for TID,which is int64 with high primary index performance,
but it is generated with auto-increment.Can we use our ID generator written by our-self or provided by your framework?
even if it can support the string type like UUID, I think it should not be constrained by any framework,actually it will be high performance if it is designed with int64.
if the ID is filled with generated content ,it will be convenient for us to merge database content without any primary or foreign key conflict.
Thank you.

#9 Re: Enhanced System Run Time Library » Enhanced System Run Time for Delphi 7 and Delphi 2007 » 2017-08-15 02:12:23

ab wrote:

I sent to you a link to download the source code as .zip, not as patches.

But I can't make this link public, due to copyright restrictions of the original Borland code.

Dear ab,
please send the source code zip file to me also because I get the the error as #47 said
with d7_up1,which has the System.pas file month is 04/2004.
and I have run the http://synopse.info/files/SynopseRTL042004.exe in winXP sp3 Chinese PRC Edition.
But I think it is none business with Chinese Or English language.

Board footer

Powered by FluxBB