Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> I suspect you didn't understand well how easy it is. I'm all ears. Or actually eyes - I'll be glad to learn some new C#/.NET interop tricks. -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Adriano dos Santos Fernandes
On Mon, Jan 17, 2022 at 4:49 PM Jiří Činčura wrote: > > Similar thing could be done for C#. > > Again, I'm not saying it couldn't be done. > > It's just with simple export I can call it right here, right now (i.e. >

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> Similar thing could be done for C#. Again, I'm not saying it couldn't be done. It's just with simple export I can call it right here, right now (i.e. https://github.com/FirebirdSQL/NETProvider/blob/master/src/FirebirdSql.Data.FirebirdClient/Client/Native/IFbClient.cs#L83-L85). It's there,

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Adriano dos Santos Fernandes
On 17/01/2022 15:36, Jiří Činčura wrote: >> The "C library" is just another way to call things. >> >> It's binary compatible with the C++ interface. In fact the C++ interface >> is a wrapper around C objects to be multi compiler compatible. > > Sure, I'm not saying it isn't. > > It's just way

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> The "C library" is just another way to call things. > > It's binary compatible with the C++ interface. In fact the C++ interface > is a wrapper around C objects to be multi compiler compatible. Sure, I'm not saying it isn't. It's just way way harder to do this type of interop from C# compared

Re: [Firebird-devel] ExprNode::FLAG_VALUE

2022-01-17 Thread Adriano dos Santos Fernandes
On 17/01/2022 12:19, Dmitry Yemanov wrote: > > Why is it done this way? AFAIU, impureCount is known during the compile > time, so the whole impure area could be preallocated during the prepare > stage. > There are others similar patterns, see irsb_message for example. The size is know at

Re: [Firebird-devel] ExprNode::FLAG_VALUE

2022-01-17 Thread Dmitry Yemanov
06.01.2022 17:13, Adriano dos Santos Fernandes wrote: See also: https://github.com/FirebirdSQL/firebird/issues/1355 https://github.com/FirebirdSQL/firebird/commit/626ab18c426fd32d482e02093e72e57330596174 Worth testing GROUP BY , ? Since v3 we must be safe. Aggregate stream allocates

Re: [Firebird-devel] Remove blr_parameter3

2022-01-17 Thread Dmitry Yemanov
14.01.2022 16:52, Adriano dos Santos Fernandes wrote: Our code does not generate blr_parameter3. I propose to remove this code, commenting this verb for not immediate reuse. It looks like as it tries to put in the third parameter slot the maximum string length moved to the parameter. Do

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Adriano dos Santos Fernandes
On 17/01/2022 11:00, Jiří Činčura wrote: >> Yes - because we can generate pure C OO API in a form I've attached here >> for illustration. > > That would work for me. :) > >> No - we never included it into distribution because currently it's not >> ready for use, some tuning will be needed.

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> Yes - because we can generate pure C OO API in a form I've attached here > for illustration. That would work for me. :) > No - we never included it into distribution because currently it's not > ready for use, some tuning will be needed. Next, you will have to use > shared library based on

Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Alex Peshkoff via Firebird-devel
On 1/17/22 15:02, Jiří Činčura wrote: Hi *, I'm looking at 12.batch_isc.cpp and wondering whether there's a way to do batching using pure C methods [1]. Something like simply calling isc_dsql_prepare instead of IAttachment::prepare. I know I can handle the "this" manually, but that's PIA. :)

[Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
Hi *, I'm looking at 12.batch_isc.cpp and wondering whether there's a way to do batching using pure C methods [1]. Something like simply calling isc_dsql_prepare instead of IAttachment::prepare. I know I can handle the "this" manually, but that's PIA. :) -- Mgr. Jiří Činčura

Re: [Firebird-devel] Are isc_sql_interprete and isc_sqlcode deprecated calls?

2022-01-17 Thread Tony Whyman
to be precise - after code review I do not see isc_sqlcode() to be maked as deprecated but I remember well that it was mentioned somewhere as not recommended in new development, sqlstate is preferred The Firebird 4 language reference states: |"SQLCODE| has been used for many years and should

Re: [Firebird-devel] Are isc_sql_interprete and isc_sqlcode deprecated calls?

2022-01-17 Thread Alex Peshkoff via Firebird-devel
On 1/17/22 13:17, Tony Whyman wrote: Aren't you confusing isc_interprete with isc_sql_interprete? definitely yes sorry isc_sql_interprete interpets the SQLCode, so it does make sense to drop it if you are getting rid of  SQLCode. absolutely right to be precise - after code review I do not

Re: [Firebird-devel] Are isc_sql_interprete and isc_sqlcode deprecated calls?

2022-01-17 Thread Tony Whyman
Aren't you confusing isc_interprete with isc_sql_interprete? isc_sql_interprete interpets the SQLCode, so it does make sense to drop it if you are getting rid of  SQLCode. On 17/01/2022 09:54, Alex Peshkoff via Firebird-devel wrote: On 1/17/22 12:24, Tony Whyman wrote: In the legacy

Re: [Firebird-devel] Are isc_sql_interprete and isc_sqlcode deprecated calls?

2022-01-17 Thread Alex Peshkoff via Firebird-devel
On 1/17/22 12:24, Tony Whyman wrote: In the legacy Firebird API, there are three functions that support error message formatting: isc_sqlcode, isc_sql_interprete, and fb_interpret. In the OO API, fb_interpret becomes IUtil->formatStatus*. *However, I can find no OO API equivalent for the

[Firebird-devel] Are isc_sql_interprete and isc_sqlcode deprecated calls?

2022-01-17 Thread Tony Whyman
In the legacy Firebird API, there are three functions that support error message formatting: isc_sqlcode, isc_sql_interprete, and fb_interpret. In the OO API, fb_interpret becomes IUtil->formatStatus*. *However, I can find no OO API equivalent for the other two. Is this because they are