Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-19 Thread marius adrian popa
I agree with Paul on this one , it would be nice for other languages translation for the base api examples (JavaScript/Typescript) and maybe some documentation so we can compare them For full drivers you can use a packaged driver from npm , maven ... ps: There is Firebird SQL Low Level api http

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-19 Thread Paul Reeves
On Wed, 19 Aug 2020 05:47:59 +0300 Norbert Saint Georges wrote: > Paul Reeves a écrit : > > > > > Does anyone have any thoughts on this? > > > > > > Paul > > First of all, thanks for your code, it's nicer to read than c ++ :-) > > Just a question about the "read only" transaction in 03.selec

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Norbert Saint Georges
Paul Reeves a écrit : Does anyone have any thoughts on this? Paul First of all, thanks for your code, it's nicer to read than c ++ :-) Just a question about the "read only" transaction in 03.select.pas on line 224, you are not using the ptb initialized on line 217, normal? -- Norbert Sa

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Paul Reeves
On Tue, 18 Aug 2020 10:50:23 +0300 Simonov Denis via Firebird-devel wrote: > > Yes, it would be nice to have some wrappers to simplify programming. In fact, you have already done quite a bit of the work in your UDR examples. Especially the contents of the 'common' directory. I'd like to includ

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Paul Reeves
On Tue, 18 Aug 2020 10:38:19 +0100 Tony Whyman wrote: > Paul, > > I am not surprised that you wrote "it is more difficult than I thought". > When I set out to upgrade IBX for Lazarus to the new Firebird 3 OO API, I > thought that it would be a relatively straightforward task. :-) I know you h

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Paul Reeves
On Mon, 17 Aug 2020 14:07:25 -0300 Adriano dos Santos Fernandes wrote: > > I'd say its correct place would be a new project under the FirebirdSQL > organization. I agree and disagree. Yes - if we create what essentially would be a driver written in object pascal. That should certainly be in a s

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread liviuslivius
For me as a developer i need only udr examples to replace/extend old udf.All other code is not required as i drop TFDConnection and choose FB driver. And thats all. New features should be integrated by Embarcadero for its driver for Delphi. And this other part is for Embarcadero or FreePascal c

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Dimitry Sibiryakov
18.08.2020 09:50, Simonov Denis via Firebird-devel wrote: For example, character data from char/varchar is not so easy to convert to delphi strings, given the character sets. Actually it is easy: just set character set to what you expect. For example, set it to UTF8 and use utf8String in Del

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Tony Whyman
Paul, I am not surprised that you wrote "it is more difficult than I thought". When I set out to upgrade IBX for Lazarus to the new Firebird 3 OO API, I thought that it would be a relatively straightforward task. My intention was to separate out the parts of IBX that were specific to the VCL/

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Roman Simakov
пн, 17 авг. 2020 г. в 20:08, Adriano dos Santos Fernandes : > I'd say its correct place would be a new project under the FirebirdSQL > organization. > > There is no Java, .Net, etc in core, so should not be Pascal examples > there, specially, as you have figured out, the API is not easy to be > dir

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-18 Thread Simonov Denis via Firebird-devel
Paul Reeves wrote Mon, 17 Aug 2020 19:24:44 +0300: On Mon, 17 Aug 2020 18:42:59 +0300 Vlad Khorsun wrote: VCL is overkill of course. We should avoid such dependencies in general samples. Some thin wrappers\helper classes could be very good to have as part of Pascal API. Obviously

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Adriano dos Santos Fernandes
On 17/08/2020 12:38, Alex Peshkoff via Firebird-devel wrote: > > Must say that when writing c++ examples I specially avoided "too good" > c++ programming practice (starting with no RAII holders in examples), > but that was due to desire not to make them more or less usable for > people who need o

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Adriano dos Santos Fernandes
On 17/08/2020 12:25, Paul Reeves wrote: > > I thought I would port the OO API examples to Object Pascal. After all, they > are quite simple, so how hard could it be? > > In fact it is more difficult than I thought and I am not happy with the > results. I've done two examples - update and select -

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Paul Reeves
On Mon, 17 Aug 2020 18:42:59 +0300 Vlad Khorsun wrote: > >VCL is overkill of course. We should avoid such dependencies in general > samples. Some thin wrappers\helper classes could be very good to have as > part of Pascal API. > Obviously the 'Visual' part of the VCL is overkill. :-) Actu

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Paul Reeves
On Mon, 17 Aug 2020 18:38:50 +0300 Alex Peshkoff via Firebird-devel wrote: > > First of all I'd like to see 2 new examples. Just to know what problems do > we discuss. I could either create a separate branch or I could just add them directly to a new sub-dir under examples in main. They have no

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Vlad Khorsun
17.08.2020 18:25, Paul Reeves wrote: I thought I would port the OO API examples to Object Pascal. After all, they are quite simple, so how hard could it be? In fact it is more difficult than I thought and I am not happy with the results. I've done two examples - update and select - and I would

Re: [Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Alex Peshkoff via Firebird-devel
On 2020-08-17 18:25, Paul Reeves wrote: I thought I would port the OO API examples to Object Pascal. After all, they are quite simple, so how hard could it be? In fact it is more difficult than I thought and I am not happy with the results. I've done two examples - update and select - and I woul

[Firebird-devel] OO API examples for Object Pascal

2020-08-17 Thread Paul Reeves
I thought I would port the OO API examples to Object Pascal. After all, they are quite simple, so how hard could it be? In fact it is more difficult than I thought and I am not happy with the results. I've done two examples - update and select - and I would like to commit them but before doing s