MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
dba.h
1
/*
2
Copyright (C) 2003-2006 MySQL AB
3
All rights reserved. Use is subject to license terms.
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; version 2 of the License.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
100
/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/
101
102
#ifndef DBA_H
103
#define DBA_H
104
105
/* --- Include files ---- */
106
107
#include <ndb_global.h>
108
#include <defs/pcn_types.h>
109
110
/* --- Types and definitions --- */
111
115
typedef
enum
{
116
DBA_NO_ERROR
= 0,
118
DBA_NOT_IMPLEMENTED
= -1,
119
DBA_NDB_ERROR
= -2,
120
DBA_ERROR
= -3,
122
DBA_APPLICATION_ERROR
= 1,
124
DBA_NO_DATA
= 2,
125
DBA_CONSTRAINT_VIOLATION
= 3,
127
DBA_SCHEMA_ERROR
= 4,
128
DBA_INSUFFICIENT_SPACE
= 5,
129
DBA_TEMPORARY_ERROR
= 6,
130
DBA_TIMEOUT
= 7,
132
DBA_OVERLOAD
= 8,
133
DBA_UNKNOWN_RESULT
= 9
135
}
DBA_Error_t
;
136
141
typedef
int
DBA_ErrorCode_t
;
142
146
typedef
enum
{
147
DBA_CHAR
,
148
DBA_INT
149
}
DBA_DataTypes_t
;
150
151
156
typedef
struct
DBA_ColumnDesc
{
157
158
const
char
*
Name
;
159
DBA_DataTypes_t
DataType
;
160
Size_t
Size
;
161
Boolean_t
IsKey
;
163
}
DBA_ColumnDesc_t
;
164
175
#define DBA_BINDING( ColName, Type, Struct, Field ) \
176
{ ColName, Type, PCN_SIZE_OF( Struct, Field ), \
177
PCN_OFFSET_OF( Struct, Field ), 0, 0 }
178
187
#define DBA_BINDING_PTR(Struct, Field, ColBindings, NbCBindings) \
188
{ 0, DBA_CHAR, NbCBindings, PCN_OFFSET_OF( Struct, Field ), \
189
1, ColBindings }
190
235
struct
DBA_ColumnBinding
{
236
const
char
*
Name
;
237
DBA_DataTypes_t
DataType
;
238
Size_t
Size
;
241
Size_t
Offset
;
243
Boolean_t
Ptr
;
244
const
struct
DBA_ColumnBinding
*
SubBinding
;
246
};
247
251
typedef
struct
DBA_ColumnBinding
DBA_ColumnBinding_t
;
252
265
typedef
struct
DBA_Binding
DBA_Binding_t
;
266
267
/* --- Exported functions --- */
268
281
DBA_Error_t
DBA_SetParameter
(
int
ParameterId,
int
Value);
282
289
DBA_Error_t
DBA_GetParameter
(
int
ParameterId,
int
* Value);
290
296
DBA_Error_t
DBA_Open
( );
297
303
DBA_Error_t
DBA_Close
(
void
);
304
310
DBA_Error_t
DBA_GetLatestError
();
311
317
DBA_ErrorCode_t
DBA_GetLatestNdbError
();
318
325
const
char
*
DBA_GetLatestErrorMsg
();
326
332
const
char
*
DBA_GetErrorMsg
(
DBA_Error_t
);
333
339
const
char
*
DBA_GetNdbErrorMsg
(
DBA_ErrorCode_t
);
340
349
DBA_Error_t
350
DBA_CreateTable
(
const
char
* TableName,
int
NbColumns,
351
const
DBA_ColumnDesc_t
Columns[] );
352
360
DBA_Error_t
361
DBA_DropTable
(
const
char
* TableName );
362
363
370
Boolean_t
371
DBA_TableExists
(
const
char
* TableName );
372
382
DBA_Binding_t
*
383
DBA_CreateBinding
(
const
char
* TableName,
384
int
NbCol,
const
DBA_ColumnBinding_t
ColsBinding[],
385
Size_t StructSz );
386
394
DBA_Error_t
395
DBA_DestroyBinding
(
DBA_Binding_t
* Binding );
396
400
typedef
long
DBA_ReqId_t
;
401
407
#define DBA_INVALID_REQID 0
408
421
typedef
void (*
DBA_AsyncCallbackFn_t
)(
DBA_ReqId_t
ReqId,
422
DBA_Error_t
Status,
423
DBA_ErrorCode_t
ErrorCode );
434
DBA_ReqId_t
435
DBA_InsertRows
(
const
DBA_Binding_t
* pBinding,
const
void
*
const
pData[],
436
int
NbRows,
437
DBA_AsyncCallbackFn_t
CbFunc );
438
449
DBA_ReqId_t
450
DBA_ArrayInsertRows
(
const
DBA_Binding_t
* pBinding,
const
void
* pData,
451
int
NbRows,
452
DBA_AsyncCallbackFn_t
CbFunc );
453
464
DBA_ReqId_t
465
DBA_UpdateRows
(
const
DBA_Binding_t
* pBinding,
const
void
*
const
pData[],
466
int
NbRows,
467
DBA_AsyncCallbackFn_t
CbFunc );
468
479
DBA_ReqId_t
480
DBA_ArrayUpdateRows
(
const
DBA_Binding_t
* pBinding,
const
void
* pData,
481
int
NbRows,
482
DBA_AsyncCallbackFn_t
CbFunc );
483
493
DBA_ReqId_t
494
DBA_DeleteRows
(
const
DBA_Binding_t
* pBinding,
const
void
*
const
pData[],
495
int
NbRows,
496
DBA_AsyncCallbackFn_t
CbFunc );
497
498
508
DBA_ReqId_t
509
DBA_ArrayDeleteRows
(
const
DBA_Binding_t
* pBinding,
const
void
* pData,
510
int
NbRows,
511
DBA_AsyncCallbackFn_t
CbFunc );
512
522
DBA_ReqId_t
523
DBA_WriteRows
(
const
DBA_Binding_t
* pBinding,
const
void
*
const
pData[],
524
int
NbRows,
525
DBA_AsyncCallbackFn_t
CbFunc );
526
536
DBA_ReqId_t
537
DBA_ArrayWriteRows
(
const
DBA_Binding_t
* pBinding,
const
void
* pData,
538
int
NbRows,
539
DBA_AsyncCallbackFn_t
CbFunc );
540
551
DBA_ReqId_t
552
DBA_ReadRows
(
const
DBA_Binding_t
* pBinding,
void
*
const
pData[],
553
int
NbRows,
554
DBA_AsyncCallbackFn_t
CbFunc );
555
566
DBA_ReqId_t
567
DBA_ArrayReadRows
(
const
DBA_Binding_t
* pBinding,
void
* pData,
568
int
NbRows,
569
DBA_AsyncCallbackFn_t
CbFunc );
570
571
/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/
572
585
DBA_ReqId_t
586
DBA_MultiInsertRow
(
const
DBA_Binding_t
*
const
pBindings[],
587
const
void
*
const
pData[],
588
int
NbBindings,
589
DBA_AsyncCallbackFn_t
CbFunc );
590
603
DBA_ReqId_t
604
DBA_MultiUpdateRow
(
const
DBA_Binding_t
*
const
pBindings[],
605
const
void
*
const
pData[],
606
int
NbBindings,
607
DBA_AsyncCallbackFn_t
CbFunc );
608
621
DBA_ReqId_t
622
DBA_MultiWriteRow
(
const
DBA_Binding_t
*
const
pBindings[],
623
const
void
*
const
pData[],
624
int
NbBindings,
625
DBA_AsyncCallbackFn_t
CbFunc );
626
639
DBA_ReqId_t
640
DBA_MultiDeleteRow
(
const
DBA_Binding_t
*
const
pBindings[],
641
const
void
*
const
pData[],
642
int
NbBindings,
643
DBA_AsyncCallbackFn_t
CbFunc );
644
657
DBA_ReqId_t
658
DBA_MultiReadRow
(
const
DBA_Binding_t
*
const
pBindings[],
659
void
*
const
pData[],
660
int
NbBindings,
661
DBA_AsyncCallbackFn_t
CbFunc );
662
663
/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/
664
672
typedef
struct
DBA_BulkReadResultSet
{
673
void
*
DataPtr
;
676
Boolean_t
RowFoundIndicator
;
679
}
DBA_BulkReadResultSet_t
;
680
694
DBA_ReqId_t
695
DBA_BulkReadRows
(
const
DBA_Binding_t
* pBinding,
696
DBA_BulkReadResultSet_t
pData[],
697
int
NbRows,
698
DBA_AsyncCallbackFn_t
CbFunc );
699
723
DBA_ReqId_t
724
DBA_BulkMultiReadRows
(
const
DBA_Binding_t
*
const
pBindings[],
725
DBA_BulkReadResultSet_t
pData[],
726
int
NbBindings,
727
int
NbRows,
728
DBA_AsyncCallbackFn_t
CbFunc );
729
732
#endif
storage
ndb
include
newtonapi
dba.h
Generated on Sat Nov 9 2013 01:26:59 for MySQL 5.6.14 Source Code Document by
1.8.1.2