theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3BlobC_cs.cs
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11using csmkkernel;
12
13/* LABEL-START */
14
15using System;
16using System.Reflection;
17using System.Runtime.InteropServices;
18using System.Runtime.CompilerServices;
19using System.Collections.Generic;
20using System.Threading;
21
22namespace cssq3lite {
23
27#if META_IS_OBJECT
28 public partial class Sq3BlobC
29#else
30 public partial class Sq3BlobC : MkObjectC
31#endif
32 {
33 private readonly static ConstructorInfo ctor = getCtor(typeof(Sq3BlobC));
34 private readonly static ThreadLocal<Sq3BlobC> MK_NULL = new ThreadLocal<Sq3BlobC>(() => {
35 return (Sq3BlobC) atomSelfNull(ctor);
36 });
37
38 public static Sq3BlobC Sq3BlobC_ObjNew (IntPtr hdl) {
39 return hdl != IntPtr.Zero ? (Sq3BlobC) atomObjNew(typeof(Sq3BlobC), ctor, hdl) : MK_NULL.Value;
40 }
41
42 private static Sq3BlobC Sq3BlobC_ObjCreate (IntPtr hdl) {
43 return hdl != IntPtr.Zero ? (Sq3BlobC) atomObjCreate(typeof(Sq3BlobC), ctor, hdl) : MK_NULL.Value;
44 }
45
46 private static IntPtr Sq3BlobC_SelfCreate (IntPtr mkrt, IntPtr obj, IntPtr env) {
47 return atomSelfCreate(ctor, obj, env);
48 }
49
50 private static void Sq3BlobC_SelfUnlink (IntPtr mkrt, IntPtr self, IntPtr env) {
51 atomSelfUnlink(self, env);
52 }
53
54 internal static void SetupThreadBLOB (IntPtr mkrt) {
55 Sq3.Sq3CsTypeUpdate(mkrt, Sq3CsTypeLookupE.BLOB, Sq3BlobC_SelfCreate, Sq3BlobC_SelfUnlink);
56 }
57
58 #if !META_STATIC_OVERWRITE
59
60 static Sq3BlobC() {
61 // M0("Sq3BlobC");
62 Sq3Lite.Setup();
63 SetupThreadBLOB(IntPtr.Zero);
64 }
65
66 #endif
67/* LABEL-END */
68
69 internal Sq3BlobC (IntPtr objP) : base(objP) {
70 }
71
72 } // END - class "Sq3BlobC"
73
74 // BEGIN-Sq3BlobC - created by 'cs_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
75
76 public partial class Sq3BlobC {
77
81
82 // doc-key: Sq3BlobC,Sq3BlobC-Class-Export,sc_
83
85 new public static Sq3BlobC HandleResolve (Int32 netHdl) {
86 IntPtr __retVal__L = Sq3.Sq3BlobHandleResolve(IntPtr.Zero, netHdl);
87 return Sq3BlobC.Sq3BlobC_ObjNew(__retVal__L);
88 }
89
90 // doc-key: Sq3BlobC,Sq3BlobC-Class-Export,om_
91
92 // skip class-overload: HandleGet = Sq3BlobHandleGet → MkObjectHandleGet
93
95 // Sq3BlobC_Class_CS_API
96 }
97
98 public partial class Sq3BlobC {
99
103
104 // doc-key: Sq3BlobC,Sq3BlobC-Class-Introspection,oc_
105
107 new public Sq3BlobC Next () {
108 IntPtr __retVal__L = Sq3.Sq3BlobNext(hdl);
109 return Sq3BlobC.Sq3BlobC_ObjNew(__retVal__L);
110 }
111
113 new public Sq3BlobC Prev () {
114 IntPtr __retVal__L = Sq3.Sq3BlobPrev(hdl);
115 return Sq3BlobC.Sq3BlobC_ObjNew(__retVal__L);
116 }
117
118 // doc-key: Sq3BlobC,Sq3BlobC-Class-Introspection,sc_
119
121 new public static Sq3BlobC Instances () {
122 IntPtr __retVal__L = Sq3.Sq3BlobInstances(IntPtr.Zero);
123 return Sq3BlobC.Sq3BlobC_ObjNew(__retVal__L);
124 }
125
127 // Sq3BlobC_Class_CS_API
128 }
129
130 public partial class Sq3BlobC {
131
135
136 // doc-key: Sq3BlobC,Sq3BlobC-Class-Misc,sc_
137
139 new public static Sq3BlobC GetNull () {
140 IntPtr __retVal__L = Sq3.Sq3BlobGetNull();
141 return Sq3BlobC.Sq3BlobC_ObjNew(__retVal__L);
142 }
143
145 // Sq3BlobC_Class_CS_API
146 }
147
148 public partial class Sq3BlobC {
149
153
154 // doc-key: Sq3BlobC,Sq3BlobC-Misc,oci
155
157 public MkBufferC Read (MkBufferC Z_inout, int iOffset) {
158 IntPtr Z_inout_hdl = MkBufferC.getOBJ_null_allow(Z_inout);
159 MkErrorE errVal = Sq3.Sq3BlobRead(mkrt, hdl, ref Z_inout_hdl, iOffset);
160 MkErrorC.Check(hdl, errVal);
161 return MkBufferC.MkBufferC_ObjNew(Z_inout_hdl);
162 }
163
164 // doc-key: Sq3BlobC,Sq3BlobC-Misc,om_
165
167 public int Bytes () {
168 Int32 __retVal__L = Sq3.Sq3BlobBytes(hdl);
169 return __retVal__L;
170 }
171
173 public void Reopen (long arg1) {
174 MkErrorE errVal = Sq3.Sq3BlobReopen(hdl, arg1);
175 MkErrorC.Check(hdl, errVal);
176 }
177
179 public void Write (MkBufferC z, int iOffset) {
180 IntPtr z_hdl = MkBufferC.getOBJ("MkBufferC",z);
181 MkErrorE errVal = Sq3.Sq3BlobWrite(mkrt, hdl, z_hdl, iOffset);
182 MkErrorC.Check(hdl, errVal);
183 }
184
186 // Sq3BlobC_Misc_CS_API
187 }
188
189 public partial class Sq3BlobC {
190
194
195 // doc-key: Sq3BlobC,Sq3BlobC-TOR,sCo
196
198 protected static IntPtr CTOR (Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags) {
199 IntPtr ppBlob;
200 IntPtr sq3lite_hdl = Sq3LiteC.getOBJ("Sq3LiteC",sq3lite);
201 IntPtr zDb_cstr = Marshal.StringToHGlobalAnsi(zDb);
202 IntPtr zTable_cstr = Marshal.StringToHGlobalAnsi(zTable);
203 IntPtr zColumn_cstr = Marshal.StringToHGlobalAnsi(zColumn);
204 MkErrorE errVal = Sq3.Sq3BlobOpen(sq3lite_hdl, zDb_cstr, zTable_cstr, zColumn_cstr, iRow, flags, out ppBlob);
205 Marshal.FreeHGlobal(zDb_cstr);
206 Marshal.FreeHGlobal(zTable_cstr);
207 Marshal.FreeHGlobal(zColumn_cstr);
208 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
209 return (IntPtr)ppBlob;
210 }
211
213 public Sq3BlobC(Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags) : this(CTOR(sq3lite, zDb, zTable, zColumn, iRow, flags)) {}
214
216 public static Sq3BlobC Open (Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags) {
217 IntPtr ppBlob;
218 IntPtr sq3lite_hdl = Sq3LiteC.getOBJ("Sq3LiteC",sq3lite);
219 IntPtr zDb_cstr = Marshal.StringToHGlobalAnsi(zDb);
220 IntPtr zTable_cstr = Marshal.StringToHGlobalAnsi(zTable);
221 IntPtr zColumn_cstr = Marshal.StringToHGlobalAnsi(zColumn);
222 MkErrorE errVal = Sq3.Sq3BlobOpen(sq3lite_hdl, zDb_cstr, zTable_cstr, zColumn_cstr, iRow, flags, out ppBlob);
223 Marshal.FreeHGlobal(zDb_cstr);
224 Marshal.FreeHGlobal(zTable_cstr);
225 Marshal.FreeHGlobal(zColumn_cstr);
226 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
227 return Sq3BlobC.Sq3BlobC_ObjCreate(ppBlob);
228 }
229
231 // Sq3BlobC_TOR_CS_API
232 }
233
234 // END-Sq3BlobC - created by 'cs_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
235
236} // END - namespace "cssq3lite"
static MkBufferC MkBufferC_ObjNew(IntPtr hdl)
static void Check(IntPtr ctx, MkErrorE err)
static object atomObjNew(Type type, ConstructorInfo ctor, IntPtr 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)
Sq3BlobC - the class known as sq3blob or Blob define by Sq3BlobS …
static Sq3BlobC Sq3BlobC_ObjNew(IntPtr hdl)
Sq3LiteC - the class known as sq3lite or Lite defined by Sq3LiteS …
#define MK_NULL
MkErrorE
new static Sq3BlobC HandleResolve(Int32 netHdl)
C#: [static] Sq3BlobC Sq3BlobC.HandleResolve(Int32 netHdl) → C-API Handle-Resolve-Slot - return ...
new Sq3BlobC Prev()
C#: Sq3BlobC blob.Prev() → C-API get previous instance from linked-list of Sq3BlobS type
new static Sq3BlobC GetNull()
C#: [static] Sq3BlobC Sq3BlobC.GetNull() → C-API Null-Slot - return a Sq3BlobC typed NULL instan...
new static Sq3BlobC Instances()
C#: [static] Sq3BlobC Sq3BlobC.Instances() → C-API get head-instance from linked-list of Sq3Blob...
new Sq3BlobC Next()
C#: Sq3BlobC blob.Next() → C-API get next instance from linked-list of Sq3BlobS type
void Write(MkBufferC z, int iOffset)
C#: sq3blob.Write(MkBufferC z, int iOffset) → C-API Write Data Into A BLOB Incrementally …
int Bytes()
C#: int sq3blob.Bytes() → C-API Return The Size Of An Open BLOB …
void Reopen(long arg1)
C#: sq3blob.Reopen(long arg1) → C-API Move a BLOB Handle to a New Row …
MkBufferC Read(MkBufferC Z_inout, int iOffset)
C#: MkBufferC sq3blob.Read(MkBufferC Z_inout, int iOffset) → C-API Read Data From A BLOB Incr...
Sq3BlobC(Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags)
CONSTRUCTOR.
static IntPtr CTOR(Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags)
C#: [constructor,static] Sq3BlobC Sq3BlobC.Open(Sq3LiteC sq3lite, string zDb, string zTable,...
static Sq3BlobC Open(Sq3LiteC sq3lite, string zDb, string zTable, string zColumn, long iRow, int flags)
C#: [constructor,static] Sq3BlobC Sq3BlobC.Open(Sq3LiteC sq3lite, string zDb, string zTable,...
static SQ3_LITE Sq3Lite(MK_MNG mng)
cast a unknown-object into an Sq3LiteS pointer or NULL if not possible