#51 2016-08-08 13:41:33

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

Re: Contribution: TSynRestDataset

Can I ? I use Fossil in my job but I never used (I don't know) for external commits.

I'd love to do that.

Last edited by EMartin (2016-08-08 13:44:18)


Esteban

Offline

#52 2016-08-09 14:31:08

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Contribution: TSynRestDataset

@Esteban, what if you fork the git repo?

Offline

#53 2016-08-10 02:32:12

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

Re: Contribution: TSynRestDataset

Because, for me, is better belonging to a normal distribution of mORMot. I'll try make a pull request in the github mORMot repository.


Esteban

Offline

#54 2016-09-12 11:31:20

StxLog
Member
From: France
Registered: 2015-09-14
Posts: 58

Re: Contribution: TSynRestDataset

We have been working with your units for a project and we found these very usefull. We have added a few things in it, and decided to share them with you:
https://drive.google.com/open?id=0B0BLh … XM1amVzdlE

SynRestVCL:
    - cast String<=>RawUTF8
    - Params null handled
    - Params string quoted

SynRestMidasVCL:
    - cast String<=>RawUTF8
    - DoBeforeDelete override instead of DoOnBeforeDelete
    - SetCommandText ifdef ISDELPHIXE instead of XE2


If you think these small edits are relevant please update the files.

We'll keep following this thread for later update.

Offline

#55 2016-09-12 13:38:36

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

Re: Contribution: TSynRestDataset

Thanks ! I'll try generate a pull request in github to @ab.


Esteban

Offline

#56 2016-09-30 07:24:14

daisutao
Member
Registered: 2015-05-08
Posts: 17

Re: Contribution: TSynRestDataset

@EMartin
good job! seem to more *mORMot* than SynDBVCL and SynDBMidasVCL.

Offline

#57 2016-10-30 12:19:54

xchinjo
Member
From: Thailand
Registered: 2016-04-29
Posts: 41
Website

Re: Contribution: TSynRestDataset

lastest SynRestVCL and SynRestMidasVCL. when use ForceID the database insert only ID field and another fields is empty value. how to fix this problem?

this version https://drive.google.com/open?id=0B0BLh … XM1amVzdlE

when change
SynRestVCL.pas

line 733
fInsertedID := fRestClient.Add(fRec, fRec.RecordProps.FieldBitsFromCSV(fFieldNames), True);
to
fInsertedID := fRestClient.Add(fRec,True,true);

ForceID is work.

Last edited by xchinjo (2016-10-31 08:18:51)


Jongruk Aripoo

Offline

#58 2017-02-08 18:07:42

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

Re: Contribution: TSynRestDataset

Updated SynRestDataset in https://drive.google.com/open?id=0Bx7LP … 3J6RG9oZVE

Change log:

SynRestVCL.pas
  * Update Logeas Informatique 2016/09/12
    - cast String<=>RawUTF8
    - Params null handled
    - Params string quoted

  - (2016/12/14) removed QuoteStr in BindParams for avoid double quotation
  - (2017/01/10)
    * removed DeletedID
    * refactoring, no functional changes
  - (2017/01/16)
    * added sftDateTimeMS, sftUnixTime to SQLFIELDTYPETODBFIELDTYPE and SQLFieldTypeToVCLDB
  - (2017/02/07)
    * add support to calculated fields (may be lookup fields too, but not tested) overriding CreateFields function
    * added TTimeLogField, derived from TSQLTimeStampField and hacking ftTimeStamp


SynRestMidasVCL.pas
  * Update Logeas Informatique 2016/09/12
    - cast String<=>RawUTF8
    - DoBeforeDelete override instead of DoOnBeforeDelete
    - SetCommandText ifdef ISDELPHIXE instead of XE2

  - added exists field ID verification
  - (2017/01/17)
    * removed DoBeforeDelete
    * refactoring, no functional changes
  - (2017/02/07)
    * fixed unknown problem with datetime fields: TCustomClientDataset.DataConvert and NativeToDatetime patched

fFactWin.pas
- (2017-08-02)
   * added calculated field example
   * added field Modified: TModTime in SampleData unit and Project19Server.db3.BIOLIFE tabled
   * added example display format in TModTime field


Esteban

Offline

#59 2017-02-08 19:28:59

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Contribution: TSynRestDataset

Thank you, Esteban. Very useful changes.

Offline

#60 2017-03-06 19:17:07

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

Re: Contribution: TSynRestDataset

Updated SynRestDataset in https://drive.google.com/open?id=0Bx7LP … jZFSE9hZ3c

Change log:

SynRestVCL.pas
  - (2017/03/06)
    * added support to field sftUnixMSTime

SynRestMidasVCL.pas
  - (2017/03/01)
    * fixed error when update datetime field (the content field updated with wrong value) in data convert patch routine

Readme.md
  - (2017/03/06)
    * Updated.


Esteban

Offline

#61 2017-03-30 09:01:13

alladin2010
Member
Registered: 2017-03-30
Posts: 2

Re: Contribution: TSynRestDataset

Hello.
I want to know if there is a visual component for version SynRestVCL.
It's possible ?
Thanks.

Offline

#62 2017-03-30 13:23:49

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

Re: Contribution: TSynRestDataset

No, but you can make it visual.

Best regards.


Esteban

Offline

#63 2017-03-30 14:06:54

alladin2010
Member
Registered: 2017-03-30
Posts: 2

Re: Contribution: TSynRestDataset

I tried with Delphi 10.1 but when I add component on form as generate error : access violation error at address 00000000
can you help me ?
Thanks.

Offline

#64 2017-04-06 17:06:50

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Hi Esteban,
SynRestDataset don't works with Mongo at backend?
( I have 404 resource not found....)

Thanks,
Stefano

Offline

#65 2017-04-06 17:10:45

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

Re: Contribution: TSynRestDataset

Hi Stemon63, SynRestDataset use REST/JSON for ORM in a mORMot way, it should work with any mORMot backend through ORM tables.

Best regards.

Esteban.


Esteban

Offline

#66 2017-04-06 17:33:30

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Ok Esteban,
where I can find latest release? (Maybe I have an old installation...)
Thanks,
Stefano

Offline

#67 2017-04-06 18:11:49

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

Re: Contribution: TSynRestDataset

In this thread, the #60, but the TSynRestdataset is not the problem, maybe you not defined the ORM table or not call CreateMissingTables in the REST server.

Best regards.

Esteban


Esteban

Offline

#68 2017-04-07 14:21:45

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Ok, Esteban.
With latest release works.
But I have a "invalid parameter" error on Applyupdates on some pc clients... (other works well...)
What I do wrong? :-)
Thanks in advance;
(wonderful component, the best is if it can be visual in IDE for assign fields to Db components, especially on forms with a lot of editors...)
Stefano

Offline

#69 2017-04-07 15:08:31

leus
Member
Registered: 2012-09-05
Posts: 79

Re: Contribution: TSynRestDataset

Esteban,

Why don't you clone the mORMot github repo and push your changes to it? It would be much more easier to get your patches this way.

Regards,
Leo

Last edited by leus (2017-04-07 15:08:55)

Offline

#70 2017-04-07 16:51:24

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

Re: Contribution: TSynRestDataset

I prefer that when downloading mORMot all things together but as I cannot update the "ThirdParty\EMartin" folder maybe I should use github. I'll put in this thread when I have created the distribution in github.

Best regards.


Esteban

Offline

#71 2017-04-07 17:45:38

leus
Member
Registered: 2012-09-05
Posts: 79

Re: Contribution: TSynRestDataset

EMartin wrote:

I prefer that when downloading mORMot all things together but as I cannot update the "ThirdParty\EMartin" folder maybe I should use github. I'll put in this thread when I have created the distribution in github.

Best regards.

That's the thing - you can clone the mORMot repository, and upload your changes to your repository. Then, by performing a pull request, you make things easier for @ab to merge your changes.

Also, it means that other users of the mORMot repository can pull your changes before they get merged into the main repository.

And you get your own set of goodies: commit history, submit issues, etc.

For example, I made a fix to your code in my own repository and then requested a pull: https://github.com/synopse/mORMot/pull/36

It's way, way better than zip archives in shared folders.

Offline

#72 2017-04-07 18:12:01

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

Re: Contribution: TSynRestDataset

Yes, but I cannot rename/drop folders inside the my folder, I don't know other constraints.


Esteban

Offline

#73 2017-04-10 09:25:59

mbadstones
Member
Registered: 2017-04-01
Posts: 5

Re: Contribution: TSynRestDataset

I tried with RadXE8 but when I add component on form as generate error : access violation error at address 00000000
can you help me ?
Thanks.

Offline

#74 2017-04-13 14:04:43

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Hi Esteban,
is TSynRestdataset multiplatform? I have no tried on Android or iOS...
(I still am still looking for a solution about a strange  "invalid parameter" error on Applyupdates on some pc clients)
Thanks!
Stefano

Offline

#75 2017-04-13 15:00:50

leus
Member
Registered: 2012-09-05
Posts: 79

Re: Contribution: TSynRestDataset

EMartin wrote:

Yes, but I cannot rename/drop folders inside the my folder, I don't know other constraints.

Sure you can. Why do you think you can't do that?

Offline

#76 2017-04-14 20:53:05

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

Re: Contribution: TSynRestDataset

@Stemon63, no it is. I documented that I don't know Linux.

@leus, because I tried.


Esteban

Offline

#77 2017-04-17 20:18:17

leus
Member
Registered: 2012-09-05
Posts: 79

Re: Contribution: TSynRestDataset

EMartin wrote:

@leus, because I tried.

What did you tried? You clone a repository, make your local changes (including "git remove" and "git add" operations) then commit to your local branch. Then, pull request and if it is approved, all changes (including added and deleted files) get merged in.

If changing contents inside a folder wasn't allowed, git wouldn't be very useful, don't you think?

Offline

#78 2017-04-17 21:00:03

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

Re: Contribution: TSynRestDataset

@leus,  I'll try that, now I have not time.

Thanks.


Esteban

Offline

#79 2017-04-18 16:57:23

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Hi Esteban,
I don't understand your answer :-)
I would like to known if TSynRestdataset is multiplatform about Android and Ios (osx), not linux....
Anyway, TsynRestdataset with mormot is almost 2,5 time faster than standard rest client + RestResponseDatasetAdapter + Fdmemtable (with the same mormot server, MongoDb, 100,000 little records fetched in a grid).

Stefano

Offline

#80 2017-04-18 17:19:02

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

Re: Contribution: TSynRestDataset

I developed TSynRestdataset with Delphi 7 under Windows, for support the any other platform, I do not have the knowledge.


Esteban

Offline

#81 2017-04-18 17:24:59

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Contribution: TSynRestDataset

Ok, Esteban... :-)

Offline

#82 2017-05-27 06:48:50

xchinjo
Member
From: Thailand
Registered: 2016-04-29
Posts: 41
Website

Re: Contribution: TSynRestDataset

@EMartin, lastest your demo when change TSQLRecord (TSQLBiolife ) field

fModified:TModTime; --- to ---> fModified: TDateTime;

after rebuild all and run again your demo is error TDateTime Field.

Delphi Berlin upd1

Last edited by xchinjo (2017-05-27 12:51:33)


Jongruk Aripoo

Offline

#83 2017-05-27 14:43:58

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

Re: Contribution: TSynRestDataset

Yes, is an general error with mORMot and Delphi Dataset from a few weeks ago, is not only TSynRestDataset problem. In the next two week I will be able to see to solve it.


Esteban

Offline

#84 2017-06-21 03:03:13

keinn
Member
Registered: 2014-10-20
Posts: 105

Re: Contribution: TSynRestDataset

@EMartin
Any updates on this wondelful TSynRestDataset ?

Offline

#85 2018-04-10 01:16:49

xchinjo
Member
From: Thailand
Registered: 2016-04-29
Posts: 41
Website

Re: Contribution: TSynRestDataset

when comment SynRestMidasVCL.pas 2 line  RedirectCode

constructor TSynRestDataSet.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  //RedirectCode(@TSynRestDataset.DataConvert, @TSynRestDataset.DataConvertPatch, @fDataConvertPatchBackup);
  fProvider := TDataSetProvider.Create(Self);
  fProvider.Name := 'InternalProvider';                 { Do not localize }
  fProvider.SetSubComponent(True);
  fProvider.Options := fProvider.Options+[poAllowCommandText];
  fProvider.OnUpdateError := DoOnUpdateError;
  SetProvider(fProvider);
  fDataSet := TSynRestSQLDataSet.Create(Self);
  fDataSet.Name := 'InternalDataSet';                   { Do not localize }
  fDataSet.AfterInsert := Self.DoOnAfterInsert;
  fDataSet.AfterOpen := Self.DoOnAfterOpen;
  fDataSet.SetSubComponent(True);
  fProvider.DataSet := fDataSet;
end;

destructor TSynRestDataSet.Destroy;
begin
  fDataSet.AfterInsert := nil;

  fProvider.DataSet := nil;
  FreeAndNil(fDataSet);
  FreeAndNil(fProvider);

  //RedirectCodeRestore(@TSynRestDataset.DataConvert, fDataConvertPatchBackup);

  inherited;
end;

datetime , date , time field is work fine for mORMot Commit number 1.18.3854

Last edited by xchinjo (2018-04-10 01:17:42)


Jongruk Aripoo

Offline

#86 2018-04-10 14:32:59

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

Re: Contribution: TSynRestDataset

Hi @ab, I updated SynRestDataset to latest mORMot version and created a pull request on github.com, but I omitted directory EMartin in ThirdPartyDemos and I renamed TSynRestDataset directory to SynRestDataset. Can you correct this error ?

@xchinjo, I removed the patch with redirectcode.

Thanks.


Esteban

Offline

#87 2020-05-17 16:06:35

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

Re: Contribution: TSynRestDataset


Esteban

Offline

#88 2020-05-17 17:42:33

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Contribution: TSynRestDataset

@EMartin

The date of files SynRestVCL.pas and SynRestMidasVCl.pas is 10-04-2018. Is this correct?

Offline

#89 2020-05-17 21:53:46

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

Re: Contribution: TSynRestDataset

Yes, is what i am currently using with Delphi 7.


Esteban

Offline

#90 2020-05-18 10:24:13

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Contribution: TSynRestDataset

Are you using a old version of SynCommons too? Some enum type definitions that was in SynCommons.pas are now in SynTable.pas

All this

  SQLFIELDTYPETODBFIELDTYPE: array[TSQLFieldType] of TSQLDBFieldType =
    (SynCommons.ftUnknown,   // sftUnknown
     SynCommons.ftUTF8,      // sftAnsiText

are now

  SQLFIELDTYPETODBFIELDTYPE: array[TSQLFieldType] of TSQLDBFieldType =
    (SynTable.ftUnknown,   // sftUnknown
     SynTable.ftUTF8,      // sftAnsiText

Offline

#91 2020-05-18 11:11:06

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

Re: Contribution: TSynRestDataset

You are right, I zipped wrong version, I have updated in https://drive.google.com/open?id=0Bx7LP … jZFSE9hZ3c.

Thanks.


Esteban

Offline

#92 2023-03-02 15:34:00

cybexr
Member
Registered: 2016-09-14
Posts: 81

Re: Contribution: TSynRestDataset

hi EMartin ,  made a mormot2 version TSynRestDataset :

https://drive.google.com/drive/folders/ … sp=sharing

Offline

#93 2023-03-02 19:52:22

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Contribution: TSynRestDataset

I can't download.

Offline

#94 2023-03-03 03:31:41

cybexr
Member
Registered: 2016-09-14
Posts: 81

Re: Contribution: TSynRestDataset

Offline

Board footer

Powered by FluxBB