Stored procedures etc. in .NET

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Stored procedures etc. in .NET

Jiří Činčura-2
Hi *,

there's something I've been working on for a few evenings and weekends.
As you might know, from Firebird 3 there's and interface to write a
plugin that allows to execute any code as stored procedure, function or
trigger.

So why not to have these in .NET, right? I have a working plugin right
now. Currently only stored procedures are supported. No blobs at the
moment as well.

You can check small example at the end of this email.

Now the important part. Is there enough interest in this to keep working
it? The hardest part is mostly over. Now it's just adding support for
more objects and polishing it, hardening it and probably adding features
based on requests (like security).

* SP:
recreate procedure demo (
  in_int integer,
  in_s varchar(20),
  in_long bigint,
  in_short smallint,
  in_char char(20)
)
returns (
  out_int integer,
  out_s varchar(20),
  out_long bigint,
  out_short smallint,
  out_char char(20)
)
external name 'Example!Example.Procedures.Demo'
engine dotnet;
* Code (not sure about the tuples yet):
public static IEnumerator<Tuple<int?, string, long?, short?, string>>
Demo(int? i, string s, long? @long, short? @short, string @char)
{
        yield return Tuple.Create(i, s, @long, @short, @char);
        yield return Tuple.Create(i + 1, s + nameof(Demo), @long + 1,
        (short?)(@short + 1), @char);
}

--
Mgr. Jiří Činčura
Independent IT Specialist

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: Stored procedures etc. in .NET

Alexander Muylaert-Gelein
Hi Jiri

There is interest on our behalf.  But we will only switch to FB 3... after release 2 or something like that.
That doesn't mean we are not interested in kicking this into motion.

Thanks

Alexander

> From: [hidden email]

> To: [hidden email]
> Date: Mon, 27 Jun 2016 20:51:31 +0200
> CC: [hidden email]
> Subject: [Firebird-net-provider] Stored procedures etc. in .NET
>
> Hi *,
>
> there's something I've been working on for a few evenings and weekends.
> As you might know, from Firebird 3 there's and interface to write a
> plugin that allows to execute any code as stored procedure, function or
> trigger.
>
> So why not to have these in .NET, right? I have a working plugin right
> now. Currently only stored procedures are supported. No blobs at the
> moment as well.
>
> You can check small example at the end of this email.
>
> Now the important part. Is there enough interest in this to keep working
> it? The hardest part is mostly over. Now it's just adding support for
> more objects and polishing it, hardening it and probably adding features
> based on requests (like security).
>
> * SP:
> recreate procedure demo (
> in_int integer,
> in_s varchar(20),
> in_long bigint,
> in_short smallint,
> in_char char(20)
> )
> returns (
> out_int integer,
> out_s varchar(20),
> out_long bigint,
> out_short smallint,
> out_char char(20)
> )
> external name 'Example!Example.Procedures.Demo'
> engine dotnet;
> * Code (not sure about the tuples yet):
> public static IEnumerator<Tuple<int?, string, long?, short?, string>>
> Demo(int? i, string s, long? @long, short? @short, string @char)
> {
> yield return Tuple.Create(i, s, @long, @short, @char);
> yield return Tuple.Create(i + 1, s + nameof(Demo), @long + 1,
> (short?)(@short + 1), @char);
> }
>
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: Stored procedures etc. in .NET

Rick Roen-2
I'm using FB3 for a new commercial app now and I'm interested.  For me, there are many occasions where I have had to write something in an SP that would have been much easier in .NET simply because I use it every day and SQL less often.
Keep us informed on the progress.

Regards,
Rick

On Mon, Jun 27, 2016 at 2:50 PM Alexander Muylaert-Gelein <[hidden email]> wrote:
Hi Jiri

There is interest on our behalf.  But we will only switch to FB 3... after release 2 or something like that.
That doesn't mean we are not interested in kicking this into motion.

Thanks

Alexander

> From: [hidden email]

> To: [hidden email]
> Date: Mon, 27 Jun 2016 20:51:31 +0200
> CC: [hidden email]
> Subject: [Firebird-net-provider] Stored procedures etc. in .NET

>
> Hi *,
>
> there's something I've been working on for a few evenings and weekends.
> As you might know, from Firebird 3 there's and interface to write a
> plugin that allows to execute any code as stored procedure, function or
> trigger.
>
> So why not to have these in .NET, right? I have a working plugin right
> now. Currently only stored procedures are supported. No blobs at the
> moment as well.
>
> You can check small example at the end of this email.
>
> Now the important part. Is there enough interest in this to keep working
> it? The hardest part is mostly over. Now it's just adding support for
> more objects and polishing it, hardening it and probably adding features
> based on requests (like security).
>
> * SP:
> recreate procedure demo (
> in_int integer,
> in_s varchar(20),
> in_long bigint,
> in_short smallint,
> in_char char(20)
> )
> returns (
> out_int integer,
> out_s varchar(20),
> out_long bigint,
> out_short smallint,
> out_char char(20)
> )
> external name 'Example!Example.Procedures.Demo'
> engine dotnet;
> * Code (not sure about the tuples yet):
> public static IEnumerator<Tuple<int?, string, long?, short?, string>>
> Demo(int? i, string s, long? @long, short? @short, string @char)
> {
> yield return Tuple.Create(i, s, @long, @short, @char);
> yield return Tuple.Create(i + 1, s + nameof(Demo), @long + 1,
> (short?)(@short + 1), @char);
> }
>
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

Adriano dos Santos Fernandes-3
In reply to this post by Jiří Činčura-2
Em 27/06/2016 15:51, Jiří Činčura escreveu:

> Hi *,
>
> there's something I've been working on for a few evenings and weekends.
> As you might know, from Firebird 3 there's and interface to write a
> plugin that allows to execute any code as stored procedure, function or
> trigger.
>
> So why not to have these in .NET, right? I have a working plugin right
> now. Currently only stored procedures are supported. No blobs at the
> moment as well.
>
> You can check small example at the end of this email.
>

Nice.

> Now the important part. Is there enough interest in this to keep working
> it? The hardest part is mostly over. Now it's just adding support for
> more objects and polishing it, hardening it and probably adding features
> based on requests (like security).
>

Can it already attach to the caller's current transaction?


Adriano

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

Daniel Rail
In reply to this post by Jiří Činčura-2
Hi,

At June 27, 2016, 3:51 PM, Jiří Činčura wrote:

> Hi *,

> there's something I've been working on for a few evenings and weekends.
> As you might know, from Firebird 3 there's and interface to write a
> plugin that allows to execute any code as stored procedure, function or
> trigger.

> So why not to have these in .NET, right? I have a working plugin right
> now. Currently only stored procedures are supported. No blobs at the
> moment as well.

> You can check small example at the end of this email.

> Now the important part. Is there enough interest in this to keep working
> it? The hardest part is mostly over. Now it's just adding support for
> more objects and polishing it, hardening it and probably adding features
> based on requests (like security).

I can see myself and our company developing stored procedures,
functions and triggers in .Net. There were times were it will likely
be easier. And, stored procedures is a good starting point, since it
can be called from a trigger. Also, this will make it easier to reuse
business logic that is developed in .Net(without having to rewrite it
in PSQL), if it is to implement such logic in a stored procedure or
trigger.

--
Best regards,
 Daniel Rail
 Senior Software Developer
 ACCRA Solutions Inc. (www.accra.ca)
 ACCRA Med Software Inc. (www.filopto.com)


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
zab
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

zab
Looks good.
I wonder where do code should persist? Server/Client?
What performance impact for such logic?

On 28 June 2016 at 15:37, Daniel Rail <[hidden email]> wrote:

> Hi,
>
> At June 27, 2016, 3:51 PM, Jiří Činčura wrote:
>
>> Hi *,
>
>> there's something I've been working on for a few evenings and weekends.
>> As you might know, from Firebird 3 there's and interface to write a
>> plugin that allows to execute any code as stored procedure, function or
>> trigger.
>
>> So why not to have these in .NET, right? I have a working plugin right
>> now. Currently only stored procedures are supported. No blobs at the
>> moment as well.
>
>> You can check small example at the end of this email.
>
>> Now the important part. Is there enough interest in this to keep working
>> it? The hardest part is mostly over. Now it's just adding support for
>> more objects and polishing it, hardening it and probably adding features
>> based on requests (like security).
>
> I can see myself and our company developing stored procedures,
> functions and triggers in .Net. There were times were it will likely
> be easier. And, stored procedures is a good starting point, since it
> can be called from a trigger. Also, this will make it easier to reuse
> business logic that is developed in .Net(without having to rewrite it
> in PSQL), if it is to implement such logic in a stored procedure or
> trigger.
>
> --
> Best regards,
>  Daniel Rail
>  Senior Software Developer
>  ACCRA Solutions Inc. (www.accra.ca)
>  ACCRA Med Software Inc. (www.filopto.com)
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

Jiří Činčura-2
> I wonder where do code should persist? Server/Client?

What? It's assembly loaded from disk. Simple as that.

> What performance impact for such logic?

We'll see.

--
Mgr. Jiří Činčura
Independent IT Specialist

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
zab
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

zab
> It's assembly loaded from disk.
Sure :). But from which disk? Client's or server's?

On 29 June 2016 at 20:18, Jiří Činčura <[hidden email]> wrote:

>> I wonder where do code should persist? Server/Client?
>
> What? It's assembly loaded from disk. Simple as that.
>
>> What performance impact for such logic?
>
> We'll see.
>
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Firebird-net-provider mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Reply | Threaded
Open this post in threaded view
|

Re: [Firebird-devel] Stored procedures etc. in .NET

Jiří Činčura-2
> Sure :). But from which disk? Client's or server's?

Server of course. How it could even load it from client...

--
Mgr. Jiří Činčura
Independent IT Specialist

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider