Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
576a856e
Commit
576a856e
authored
Mar 23, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added type tags to operations
parent
6e73098f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
8 deletions
+64
-8
ndb/include/ndbapi/NdbIndexOperation.hpp
ndb/include/ndbapi/NdbIndexOperation.hpp
+5
-0
ndb/include/ndbapi/NdbOperation.hpp
ndb/include/ndbapi/NdbOperation.hpp
+45
-2
ndb/include/ndbapi/NdbScanOperation.hpp
ndb/include/ndbapi/NdbScanOperation.hpp
+2
-1
ndb/src/ndbapi/NdbIndexOperation.cpp
ndb/src/ndbapi/NdbIndexOperation.cpp
+7
-1
ndb/src/ndbapi/NdbOperation.cpp
ndb/src/ndbapi/NdbOperation.cpp
+2
-1
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+3
-3
No files found.
ndb/include/ndbapi/NdbIndexOperation.hpp
View file @
576a856e
...
@@ -129,6 +129,11 @@ public:
...
@@ -129,6 +129,11 @@ public:
*/
*/
int
deleteTuple
();
int
deleteTuple
();
/**
* Get index object for this operation
*/
const
NdbDictionary
::
Index
*
getIndex
()
const
;
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/**
/**
* Define the NdbIndexOperation to be a standard operation of type
* Define the NdbIndexOperation to be a standard operation of type
...
...
ndb/include/ndbapi/NdbOperation.hpp
View file @
576a856e
...
@@ -55,6 +55,29 @@ public:
...
@@ -55,6 +55,29 @@ public:
* @{
* @{
*/
*/
/**
* Different access types (supported by sub-classes of NdbOperation)
*/
enum
Type
{
PrimaryKeyAccess
///< Read, insert, update, or delete using pk
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
0
// NdbOperation
#endif
,
UniqueIndexAccess
///< Read, update, or delete using unique index
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
1
// NdbIndexOperation
#endif
,
TableScan
///< Full table scan
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
2
// NdbScanOperation
#endif
,
OrderedIndexScan
///< Ordered index scan
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
3
// NdbIndexScanOperation
#endif
};
/**
/**
* Lock when performing read
* Lock when performing read
*/
*/
...
@@ -715,6 +738,11 @@ public:
...
@@ -715,6 +738,11 @@ public:
*/
*/
const
NdbDictionary
::
Table
*
getTable
()
const
;
const
NdbDictionary
::
Table
*
getTable
()
const
;
/**
* Get the type of access for this operation
*/
const
Type
getType
()
const
;
/** @} *********************************************************************/
/** @} *********************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
...
@@ -768,7 +796,7 @@ protected:
...
@@ -768,7 +796,7 @@ protected:
int
init
(
const
class
NdbTableImpl
*
,
NdbTransaction
*
aCon
);
int
init
(
const
class
NdbTableImpl
*
,
NdbTransaction
*
aCon
);
void
initInterpreter
();
void
initInterpreter
();
NdbOperation
(
Ndb
*
aNdb
);
NdbOperation
(
Ndb
*
aNdb
,
Type
aType
=
PrimaryKeyAccess
);
virtual
~
NdbOperation
();
virtual
~
NdbOperation
();
void
next
(
NdbOperation
*
);
// Set next pointer
void
next
(
NdbOperation
*
);
// Set next pointer
NdbOperation
*
next
();
// Get next pointer
NdbOperation
*
next
();
// Get next pointer
...
@@ -881,6 +909,8 @@ protected:
...
@@ -881,6 +909,8 @@ protected:
* These are the private variables that are defined in the operation objects.
* These are the private variables that are defined in the operation objects.
*****************************************************************************/
*****************************************************************************/
Type
m_type
;
NdbReceiver
theReceiver
;
NdbReceiver
theReceiver
;
NdbError
theError
;
// Errorcode
NdbError
theError
;
// Errorcode
...
@@ -1043,6 +1073,19 @@ NdbOperation::getFirstRecAttr() const
...
@@ -1043,6 +1073,19 @@ NdbOperation::getFirstRecAttr() const
return
theReceiver
.
theFirstRecAttr
;
return
theReceiver
.
theFirstRecAttr
;
}
}
/******************************************************************************
Type getType()
Return Value Return the Type.
Remark: Gets type of access.
******************************************************************************/
inline
const
NdbOperation
::
Type
NdbOperation
::
getType
()
const
{
return
m_type
;
}
/******************************************************************************
/******************************************************************************
OperationStatus Status();
OperationStatus Status();
...
...
ndb/include/ndbapi/NdbScanOperation.hpp
View file @
576a856e
...
@@ -177,7 +177,8 @@ public:
...
@@ -177,7 +177,8 @@ public:
int
restart
(
bool
forceSend
=
false
);
int
restart
(
bool
forceSend
=
false
);
protected:
protected:
NdbScanOperation
(
Ndb
*
aNdb
);
NdbScanOperation
(
Ndb
*
aNdb
,
NdbOperation
::
Type
aType
=
NdbOperation
::
TableScan
);
virtual
~
NdbScanOperation
();
virtual
~
NdbScanOperation
();
int
nextResultImpl
(
bool
fetchAllowed
=
true
,
bool
forceSend
=
false
);
int
nextResultImpl
(
bool
fetchAllowed
=
true
,
bool
forceSend
=
false
);
...
...
ndb/src/ndbapi/NdbIndexOperation.cpp
View file @
576a856e
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include <signaldata/IndxAttrInfo.hpp>
#include <signaldata/IndxAttrInfo.hpp>
NdbIndexOperation
::
NdbIndexOperation
(
Ndb
*
aNdb
)
:
NdbIndexOperation
::
NdbIndexOperation
(
Ndb
*
aNdb
)
:
NdbOperation
(
aNdb
),
NdbOperation
(
aNdb
,
NdbOperation
::
UniqueIndexAccess
),
m_theIndex
(
NULL
)
m_theIndex
(
NULL
)
{
{
m_tcReqGSN
=
GSN_TCINDXREQ
;
m_tcReqGSN
=
GSN_TCINDXREQ
;
...
@@ -164,6 +164,12 @@ int NdbIndexOperation::interpretedDeleteTuple()
...
@@ -164,6 +164,12 @@ int NdbIndexOperation::interpretedDeleteTuple()
return
NdbOperation
::
interpretedDeleteTuple
();
return
NdbOperation
::
interpretedDeleteTuple
();
}
}
const
NdbDictionary
::
Index
*
NdbIndexOperation
::
getIndex
()
const
{
return
m_theIndex
;
}
int
int
NdbIndexOperation
::
prepareSend
(
Uint32
aTC_ConnectPtr
,
Uint64
aTransactionId
)
NdbIndexOperation
::
prepareSend
(
Uint32
aTC_ConnectPtr
,
Uint64
aTransactionId
)
{
{
...
...
ndb/src/ndbapi/NdbOperation.cpp
View file @
576a856e
...
@@ -37,7 +37,8 @@
...
@@ -37,7 +37,8 @@
* aTable: Pointers to the Table object
* aTable: Pointers to the Table object
* Remark: Creat an object of NdbOperation.
* Remark: Creat an object of NdbOperation.
****************************************************************************/
****************************************************************************/
NdbOperation
::
NdbOperation
(
Ndb
*
aNdb
)
:
NdbOperation
::
NdbOperation
(
Ndb
*
aNdb
,
NdbOperation
::
Type
aType
)
:
m_type
(
aType
),
theReceiver
(
aNdb
),
theReceiver
(
aNdb
),
theErrorLine
(
0
),
theErrorLine
(
0
),
theNdb
(
aNdb
),
theNdb
(
aNdb
),
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
576a856e
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
#define DEBUG_NEXT_RESULT 0
#define DEBUG_NEXT_RESULT 0
NdbScanOperation
::
NdbScanOperation
(
Ndb
*
aNdb
)
:
NdbScanOperation
::
NdbScanOperation
(
Ndb
*
aNdb
,
NdbOperation
::
Type
aType
)
:
NdbOperation
(
aNdb
),
NdbOperation
(
aNdb
,
aType
),
m_transConnection
(
NULL
)
m_transConnection
(
NULL
)
{
{
theParallelism
=
0
;
theParallelism
=
0
;
...
@@ -1012,7 +1012,7 @@ NdbScanOperation::getBlobHandle(Uint32 anAttrId)
...
@@ -1012,7 +1012,7 @@ NdbScanOperation::getBlobHandle(Uint32 anAttrId)
}
}
NdbIndexScanOperation
::
NdbIndexScanOperation
(
Ndb
*
aNdb
)
NdbIndexScanOperation
::
NdbIndexScanOperation
(
Ndb
*
aNdb
)
:
NdbScanOperation
(
aNdb
)
:
NdbScanOperation
(
aNdb
,
NdbOperation
::
OrderedIndexScan
)
{
{
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment