ESHU_CODING Telegram 377
Forwarded from .NET epeshk blog
pl/dotnet

Для PostgreSQL появилась поддержка C# и F# как языков процедур.

Внутри используется модифицированная библиотека Npgsql, в которой сетевые вызовы заменены на прямые вызовы функций бд. Это позволяет писать в хранимых процедурах такой же код, как при работе с базой через библиотеку, с привычными Npgsql типами.


CREATE OR REPLACE FUNCTION dynamic_record_generator_srf(lim INT8)
RETURNS SETOF record
AS $$
upperLimit = lim.HasValue ? lim : System.Int32.MaxValue;
for(long i=0;i<upperLimit;i++){ yield return new object?[] { i, $"Number is {i}" }; }
$$ LANGUAGE plcsharp;

CREATE OR REPLACE FUNCTION dynamic_record_generator_srf_fsharp(lim INT8)
RETURNS SETOF record
AS $$
let upperLimit = Option.defaultValue (int64 System.Int32.MaxValue) lim
seq { for i in 0L .. upperLimit - 1L do yield [| box i; $"Number is {i}" |] }
$$ LANGUAGE plfsharp;

https://www.postgresql.org/about/news/announcing-pldotnet-version-099-beta-2838/

https://github.com/Brick-Abode/pldotnet/wiki/pldotnet:-White-Paper

А о релизе интеграции я узнал из канала @vchirikov

@epeshkblog | Поддержать канал
👎1😱1



tgoop.com/eshu_coding/377
Create:
Last Update:

pl/dotnet

Для PostgreSQL появилась поддержка C# и F# как языков процедур.

Внутри используется модифицированная библиотека Npgsql, в которой сетевые вызовы заменены на прямые вызовы функций бд. Это позволяет писать в хранимых процедурах такой же код, как при работе с базой через библиотеку, с привычными Npgsql типами.


CREATE OR REPLACE FUNCTION dynamic_record_generator_srf(lim INT8)
RETURNS SETOF record
AS $$
upperLimit = lim.HasValue ? lim : System.Int32.MaxValue;
for(long i=0;i<upperLimit;i++){ yield return new object?[] { i, $"Number is {i}" }; }
$$ LANGUAGE plcsharp;

CREATE OR REPLACE FUNCTION dynamic_record_generator_srf_fsharp(lim INT8)
RETURNS SETOF record
AS $$
let upperLimit = Option.defaultValue (int64 System.Int32.MaxValue) lim
seq { for i in 0L .. upperLimit - 1L do yield [| box i; $"Number is {i}" |] }
$$ LANGUAGE plfsharp;

https://www.postgresql.org/about/news/announcing-pldotnet-version-099-beta-2838/

https://github.com/Brick-Abode/pldotnet/wiki/pldotnet:-White-Paper

А о релизе интеграции я узнал из канала @vchirikov

@epeshkblog | Поддержать канал

BY Эшу быдлокодит


Share with your friend now:
tgoop.com/eshu_coding/377

View MORE
Open in Telegram


Telegram News

Date: |

The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. The group also hosted discussions on committing arson, Judge Hui said, including setting roadblocks on fire, hurling petrol bombs at police stations and teaching people to make such weapons. The conversation linked to arson went on for two to three months, Hui said. So far, more than a dozen different members have contributed to the group, posting voice notes of themselves screaming, yelling, groaning, and wailing in various pitches and rhythms. End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. ZDNET RECOMMENDS
from us


Telegram Эшу быдлокодит
FROM American