16using System.Reflection;
17using System.Runtime.InteropServices;
18using System.Runtime.CompilerServices;
19using System.Collections.Generic;
20using System.Threading;
28 public partial class Sq3StmtC
33 private readonly
static ConstructorInfo ctor =
getCtor(typeof(Sq3StmtC));
34 private readonly
static ThreadLocal<Sq3StmtC> MK_NULL =
new ThreadLocal<Sq3StmtC>(() => {
42 private static Sq3StmtC Sq3StmtC_ObjCreate (IntPtr
hdl) {
46 private static IntPtr Sq3StmtC_SelfCreate (IntPtr
mkrt, IntPtr obj, IntPtr env) {
50 private static void Sq3StmtC_SelfUnlink (IntPtr
mkrt, IntPtr
self, IntPtr env) {
54 internal static void SetupThreadSTMT (IntPtr
mkrt) {
55 Sq3.Sq3CsTypeUpdate(
mkrt, Sq3CsTypeLookupE.STMT, Sq3StmtC_SelfCreate, Sq3StmtC_SelfUnlink);
58 #if !META_STATIC_OVERWRITE
63 SetupThreadSTMT(IntPtr.Zero);
69 internal Sq3StmtC (IntPtr objP) : base(objP) {
76 public partial class Sq3StmtC {
86 var blob_size = Marshal.SizeOf(blob[0]) * blob.Length;
87 var blob_data = Marshal.AllocHGlobal(blob_size);
88 Marshal.Copy(blob,0,blob_data,blob_size);
96 MkErrorE errVal = Sq3.Sq3StmtBindDouble(
hdl, arg1, arg2);
102 MkErrorE errVal = Sq3.Sq3StmtBindInt(
hdl, arg1, arg2);
108 MkErrorE errVal = Sq3.Sq3StmtBindInt64(
hdl, arg1, arg2);
120 MkErrorE errVal = Sq3.Sq3StmtBindParameterCount(
hdl);
126 IntPtr zName_cstr = Marshal.StringToHGlobalAnsi(zName);
127 MkErrorE errVal = Sq3.Sq3StmtBindParameterIndex(
hdl, zName_cstr);
128 Marshal.FreeHGlobal(zName_cstr);
134 IntPtr __retVal__L = Sq3.Sq3StmtBindParameterName(
hdl, arg1);
135 return Marshal.PtrToStringAnsi(__retVal__L);
140 IntPtr text_ref_cstr = Marshal.StringToHGlobalAnsi(text);
143 Marshal.FreeHGlobal(text_ref_cstr);
150 MkErrorE errVal = Sq3.Sq3StmtBindValue(
hdl, arg1, arg2_hdl);
156 MkErrorE errVal = Sq3.Sq3StmtBindZeroblob(
hdl, arg1, n);
162 MkErrorE errVal = Sq3.Sq3StmtBindZeroblob64(
hdl, arg1, arg2);
170 public partial class Sq3StmtC {
180 IntPtr __retVal__L = Sq3.Sq3StmtHandleResolve(IntPtr.Zero, netHdl);
192 public partial class Sq3StmtC {
202 IntPtr __retVal__L = Sq3.Sq3StmtNext(
hdl);
208 IntPtr __retVal__L = Sq3.Sq3StmtPrev(
hdl);
216 IntPtr __retVal__L = Sq3.Sq3StmtInstances(IntPtr.Zero);
224 public partial class Sq3StmtC {
234 IntPtr __retVal__L = Sq3.Sq3StmtGetNull();
242 public partial class Sq3StmtC {
252 IntPtr __retVal__L = Sq3.Sq3StmtColumnValue(
hdl, iCol);
261 int __retVal__L_size = (int) __retVal__L.
size;
262 byte[] ____retVal__L__S =
new byte[__retVal__L_size];
263 Marshal.Copy(__retVal__L.
data,____retVal__L__S,0,(
int)__retVal__L_size);
264 return ____retVal__L__S;
269 Int32 __retVal__L = Sq3.Sq3StmtColumnBytes(
hdl, iCol);
275 Int32 __retVal__L = Sq3.Sq3StmtColumnCount(
hdl);
281 Double __retVal__L = Sq3.Sq3StmtColumnDouble(
hdl, iCol);
287 Int32 __retVal__L = Sq3.Sq3StmtColumnInt(
hdl, iCol);
293 Int64 __retVal__L = Sq3.Sq3StmtColumnInt64(
hdl, iCol);
299 IntPtr __retVal__L = Sq3.Sq3StmtColumnName(
hdl, N);
300 return Marshal.PtrToStringAnsi(__retVal__L);
306 return Marshal.PtrToStringAnsi(__retVal__L.
ptr,(
int)__retVal__L.
len);
311 Sq3TypeE __retVal__L = Sq3.Sq3StmtColumnType(
hdl, iCol);
319 public partial class Sq3StmtC {
329 IntPtr __retVal__L = Sq3.Sq3StmtDbHandle(
hdl);
363 MkErrorE errVal = Sq3.Sq3StmtStatus(
hdl, op, resetFlg);
371 public partial class Sq3StmtC {
383 IntPtr __retVal__L = Sq3.Sq3StmtNextStmt(pDb_hdl, pStmt_hdl);
412 MkErrorE errVal = Sq3.Sq3StmtStep(
hdl, out retCode);
421 public partial class Sq3StmtC {
431 IntPtr __retVal__L = Sq3.Sq3StmtExpandedSql(
hdl);
432 return Marshal.PtrToStringAnsi(__retVal__L);
437 IntPtr __retVal__L = Sq3.Sq3StmtGetPzTail(
hdl);
438 return Marshal.PtrToStringAnsi(__retVal__L);
443 IntPtr __retVal__L = Sq3.Sq3StmtSql(
hdl);
444 return Marshal.PtrToStringAnsi(__retVal__L);
463 IntPtr zSql_ref_cstr = Marshal.StringToHGlobalAnsi(zSql);
465 MkErrorE errVal = Sq3.Sq3StmtPrepareV2(db_hdl, zSql_ref, out ppStmt);
466 Marshal.FreeHGlobal(zSql_ref_cstr);
468 return (IntPtr)ppStmt;
478 IntPtr zSql_ref_cstr = Marshal.StringToHGlobalAnsi(zSql);
480 MkErrorE errVal = Sq3.Sq3StmtPrepareV2(db_hdl, zSql_ref, out ppStmt);
481 Marshal.FreeHGlobal(zSql_ref_cstr);
483 return Sq3StmtC.Sq3StmtC_ObjCreate(ppStmt);
490 IntPtr zSql_ref_cstr = Marshal.StringToHGlobalAnsi(zSql);
492 MkErrorE errVal = Sq3.Sq3StmtPrepareV3(db_hdl, zSql_ref, prepFlags, out ppStmt);
493 Marshal.FreeHGlobal(zSql_ref_cstr);
495 return Sq3StmtC.Sq3StmtC_ObjCreate(ppStmt);
static void Check(IntPtr ctx, MkErrorE err)
static object atomObjNew(Type type, ConstructorInfo ctor, IntPtr obj)
static IntPtr getOBJ_null_allow(MkObjectC obj)
static object atomObjCreate(Type type, ConstructorInfo ctor, IntPtr obj)
static void atomSelfUnlink(IntPtr self, IntPtr env)
static object atomSelfNull(ConstructorInfo ctor)
static IntPtr getOBJ(string cls, MkObjectC obj)
static ConstructorInfo getCtor(Type type)
static IntPtr atomSelfCreate(ConstructorInfo ctor, IntPtr obj, IntPtr env)
static Mk.MkBinaryR MkBinaryCreate(long size, IntPtr data)
static Mk.MkStringR MkStringCreate_1(IntPtr str)
Sq3LiteC - the class known as sq3lite or Lite defined by Sq3LiteS …
static Sq3LiteC Sq3LiteC_ObjNew(IntPtr hdl)
Sq3StmtC - the class known as sq3stmt or Statement defined by Sq3StmtS …
static Sq3StmtC Sq3StmtC_ObjNew(IntPtr hdl)
Sq3ValueC - the class known as sq3val or Value define by Sq3ValueS …
static Sq3ValueC Sq3ValueC_ObjNew(IntPtr hdl)
static SQ3_LITE Sq3Lite(MK_MNG mng)
cast a unknown-object into an Sq3LiteS pointer or NULL if not possible
void BindZeroblob64(int arg1, long arg2)
C#: sq3stmt.BindZeroblob64(int arg1, long arg2) → C-API Binding Values To Prepared Statements …
void BindText(int pos, string text)
C#: sq3stmt.BindText(int pos, string text) → C-API Bind a MkStringR Value To a Prepared Stateme...
void BindValue(int arg1, Sq3ValueC arg2)
C#: sq3stmt.BindValue(int arg1, Sq3ValueC arg2) → C-API Binding Values To Prepared Statements …
void BindDouble(int arg1, double arg2)
C#: sq3stmt.BindDouble(int arg1, double arg2) → C-API Binding Values To Prepared Statements …
void BindZeroblob(int arg1, int n)
C#: sq3stmt.BindZeroblob(int arg1, int n) → C-API Binding Values To Prepared Statements …
void BindInt64(int arg1, long arg2)
C#: sq3stmt.BindInt64(int arg1, long arg2) → C-API Binding Values To Prepared Statements …
void BindNull(int arg1)
C#: sq3stmt.BindNull(int arg1) → C-API Binding Values To Prepared Statements …
void BindParameterCount()
C#: sq3stmt.BindParameterCount() → C-API Number Of SQL Parameters …
void BindBlob(int pos, byte[] blob)
C#: sq3stmt.BindBlob(int pos, byte[] blob) → C-API Bind a MkBinaryR Value To a Prepared Stateme...
string BindParameterName(int arg1)
C#: string sq3stmt.BindParameterName(int arg1) → C-API Name Of A Host Parameter …
void BindParameterIndex(string zName)
C#: sq3stmt.BindParameterIndex(string zName) → C-API Index Of A Parameter With A Given Name …
void BindInt(int arg1, int arg2)
C#: sq3stmt.BindInt(int arg1, int arg2) → C-API Binding Values To Prepared Statements …
new Sq3StmtC Prev()
C#: Sq3StmtC stmt.Prev() → C-API get previous instance from linked-list of Sq3StmtS type
new Sq3StmtC Next()
C#: Sq3StmtC stmt.Next() → C-API get next instance from linked-list of Sq3StmtS type
new static Sq3StmtC Instances()
C#: [static] Sq3StmtC Sq3StmtC.Instances() → C-API get head-instance from linked-list of Sq3Stmt...
new static Sq3StmtC GetNull()
C#: [static] Sq3StmtC Sq3StmtC.GetNull() → C-API Null-Slot - return a Sq3StmtC typed NULL instan...
new static Sq3StmtC HandleResolve(Int32 netHdl)
C#: [static] Sq3StmtC Sq3StmtC.HandleResolve(Int32 netHdl) → C-API Handle-Resolve-Slot - return ...
int ColumnCount()
C#: int pStmt.ColumnCount() → C-API Number Of Columns In A Result Set …
double ColumnDouble(int iCol)
C#: double sq3stmt.ColumnDouble(int iCol) → C-API Result Values From A Query …
Sq3TypeE ColumnType(int iCol)
C#: Sq3TypeE sq3stmt.ColumnType(int iCol) → C-API Result Values From A Query …
string ColumnText(int iCol)
C#: string sq3stmt.ColumnText(int iCol) → C-API Result a MkStringR Value From A Query.
long ColumnInt64(int iCol)
C#: long sq3stmt.ColumnInt64(int iCol) → C-API Result Values From A Query …
int ColumnBytes(int iCol)
C#: int sq3stmt.ColumnBytes(int iCol) → C-API Result Values From A Query …
byte[] ColumnBlob(int iCol)
C#: byte[] sq3stmt.ColumnBlob(int iCol) → C-API Result a MkBinaryR Value From A Query.
string ColumnName(int N)
C#: string sq3stmt.ColumnName(int N) → C-API Column Names In A Result Set …
Sq3ValueC ColumnValue(int iCol)
C#: Sq3ValueC sq3stmt.ColumnValue(int iCol) → C-API Result Values From A Query …
int ColumnInt(int iCol)
C#: int sq3stmt.ColumnInt(int iCol) → C-API Result Values From A Query …
void Busy()
C#: sq3stmt.Busy() → C-API Determine If A Prepared Statement Has Been Reset …
void DataCount()
C#: pStmt.DataCount() → C-API Number of columns in a result set …
void Readonly()
C#: pStmt.Readonly() → C-API Determine If An SQL Statement Writes The Database …
void Status(Sq3StmtStatusE op, bool resetFlg)
C#: sq3stmt.Status(Sq3StmtStatusE op, bool resetFlg) → C-API Prepared Statement Status …
Sq3LiteC DbHandle()
C#: Sq3LiteC sq3stmt.DbHandle() → C-API Find The Database Handle Of A Prepared Statement …
void IsExplain()
C#: pStmt.IsExplain() → C-API Query The EXPLAIN Setting For A Prepared Statement …
static Sq3StmtC NextStmt(Sq3LiteC pDb, Sq3StmtC pStmt=null)
C#: [static] Sq3StmtC Sq3StmtC.NextStmt(Sq3LiteC pDb, Sq3StmtC pStmt = null) → C-API Find the ne...
void ClearBindings()
C#: sq3stmt.ClearBindings() → C-API Reset All Bindings On A Prepared Statement …
Sq3ErrorE Step()
C#: Sq3ErrorE sq3stmt.Step() → C-API Evaluate An SQL Statement …
void Explain(int eMode)
C#: pStmt.Explain(int eMode) → C-API Change The EXPLAIN Setting For A Prepared Statement …
void Reset()
C#: pStmt.Reset() → C-API Reset A Prepared Statement Object …
string Sql()
C#: string pStmt.Sql() → C-API Retrieving Statement SQL …
string GetPzTail()
C#: string sq3stmt.GetPzTail() → C-API return the non compiled sql-statement from Sq3StmtPrepar...
string ExpandedSql()
C#: string pStmt.ExpandedSql() → C-API Retrieving Statement SQL …
Sq3StmtC(Sq3LiteC db, string zSql)
CONSTRUCTOR.
static IntPtr CTOR(Sq3LiteC db, string zSql)
C#: [constructor,static] Sq3StmtC Sq3StmtC.PrepareV2(Sq3LiteC db, string zSql) → C-API Compili...
void Sq3Finalize()
C#: [destructor] pStmt.Sq3Finalize() → C-API Destroy A Prepared Statement Object …
static Sq3StmtC PrepareV3(Sq3LiteC db, string zSql, Sq3PrepareEF prepFlags=Sq3PrepareEF.NO)
C#: [constructor,static] Sq3StmtC Sq3StmtC.PrepareV3(Sq3LiteC db, string zSql, Sq3PrepareEF prepFlags...
static Sq3StmtC PrepareV2(Sq3LiteC db, string zSql)
C#: [constructor,static] Sq3StmtC Sq3StmtC.PrepareV2(Sq3LiteC db, string zSql) → C-API Compili...
Sq3ErrorE
→ C-API: Sq3ErrorE → C-API: Sq3ErrorE
Sq3PrepareEF
→ C-API: Sq3PrepareEF → C-API: Sq3PrepareEF
Sq3StmtStatusE
→ C-API: Sq3StmtStatusE → C-API: Sq3StmtStatusE
Sq3TypeE
→ C-API: Sq3TypeE → C-API: Sq3TypeE