//
//
// PL/.NET (pldotnet) - PostgreSQL support for .NET C# and F# as
// procedural languages (PL)
//
//
// Copyright (c) 2023 Brick Abode
//
// This code is subject to the terms of the PostgreSQL License.
// The full text of the license can be found in the LICENSE file
// at the top level of the pldotnet repository.
//
//
using System;
using System.Runtime.InteropServices;
using NpgsqlTypes;
namespace PlDotNET.Handler
{
///
/// A generic class for all type handlers which handle PostreSQL arrays.
///
public static partial class ArrayHandler
{
public static int Maxdim = get_Maxdim();
///
/// C function declared in pldotnet_conversions.h.
/// See ::get_Maxdim().
///
[LibraryImport("@PKG_LIBDIR/pldotnet.so")]
public static partial int get_Maxdim();
///
/// C function declared in pldotnet_conversions.h.
/// See ::pldotnet_GetArrayAttributes().
///
[LibraryImport("@PKG_LIBDIR/pldotnet.so")]
public static unsafe partial void pldotnet_GetArrayAttributes(IntPtr datum, ref int typeId, ref int nDims, int[] dims, ref byte* nullmap);
///
/// C function declared in pldotnet_conversions.h.
/// See ::pldotnet_GetArrayDatum().
///
[LibraryImport("@PKG_LIBDIR/pldotnet.so")]
public static unsafe partial int pldotnet_GetArrayDatum(IntPtr arrayDatum, IntPtr[] results, int nElems, int typeId);
///
/// C function declared in pldotnet_conversions.h.
/// See ::pldotnet_CreateDatumArray().
///
[LibraryImport("@PKG_LIBDIR/pldotnet.so")]
public static partial IntPtr pldotnet_CreateDatumArray(int elementId, int dimNumber, int[] dimLengths, IntPtr[] datums, byte[] nullmap = null);
}
}