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
c24afe01
Commit
c24afe01
authored
Dec 30, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Dbc::pget addresses #234
git-svn-id:
file:///svn/tokudb@1430
c7de825b-a66e-492c-adef-691d508d4ae1
parent
a1db30b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
cxx/db.cpp
cxx/db.cpp
+5
-0
cxx/dbc.cpp
cxx/dbc.cpp
+8
-0
include/db_cxx.h
include/db_cxx.h
+11
-15
No files found.
cxx/db.cpp
View file @
c24afe01
...
...
@@ -37,6 +37,11 @@ Db::~Db() {
}
}
int
Db
::
set_flags
(
u_int32_t
flags
)
{
int
ret
=
the_db
->
set_flags
(
the_db
,
flags
);
return
the_Env
->
maybe_throw_error
(
ret
);
}
int
Db
::
close
(
u_int32_t
flags
)
{
if
(
!
the_db
)
{
return
the_Env
->
maybe_throw_error
(
EINVAL
);
...
...
cxx/dbc.cpp
View file @
c24afe01
...
...
@@ -15,6 +15,14 @@ int Dbc::get(Dbt* key, Dbt *data, u_int32_t flags) {
return
env
->
maybe_throw_error
(
ret
);
}
int
Dbc
::
pget
(
Dbt
*
key
,
Dbt
*
pkey
,
Dbt
*
data
,
u_int32_t
flags
)
{
DBC
*
dbc
=
this
;
int
ret
=
dbc
->
c_pget
(
dbc
,
key
,
pkey
,
data
,
flags
);
DB_ENV
*
dbenv_c
=
dbc
->
dbp
->
dbenv
;
DbEnv
*
env
=
(
DbEnv
*
)
dbenv_c
->
api1_internal
;
return
env
->
maybe_throw_error
(
ret
);
}
int
Dbc
::
del
(
u_int32_t
flags
)
{
DBC
*
dbc
=
this
;
int
ret
=
dbc
->
c_del
(
dbc
,
flags
);
...
...
include/db_cxx.h
View file @
c24afe01
...
...
@@ -9,8 +9,7 @@ class DbTxn;
class
Dbc
;
class
DbException
;
class
DbException
:
public
std
::
exception
{
class
DbException
:
public
std
::
exception
{
friend
class
DbEnv
;
public:
~
DbException
()
throw
();
...
...
@@ -28,25 +27,22 @@ class DbException : public std::exception
void
FillTheWhat
(
void
);
};
class
DbDeadlockException
:
public
DbException
{
class
DbDeadlockException
:
public
DbException
{
public:
DbDeadlockException
(
DbEnv
*
);
};
class
DbLockNotGrantedException
{
class
DbLockNotGrantedException
{
};
class
DbMemoryException
{
class
DbMemoryException
{
};
class
DbRunRecoveryException
{
class
DbRunRecoveryException
{
};
// DBT and Dbt objects are the same pointers. So watch out if you use Dbt to make other classes (e.g., with subclassing).
class
Dbt
:
private
DBT
{
class
Dbt
:
private
DBT
{
friend
class
Dbc
;
public:
...
...
@@ -179,11 +175,11 @@ class DbTxn {
};
class
Dbc
:
protected
DBC
{
class
Dbc
:
protected
DBC
{
public:
int
close
(
void
);
int
get
(
Dbt
*
,
Dbt
*
,
u_int32_t
);
int
get
(
Dbt
*
,
Dbt
*
,
u_int32_t
);
int
pget
(
Dbt
*
,
Dbt
*
,
Dbt
*
,
u_int32_t
);
int
del
(
u_int32_t
);
private:
Dbc
();
// User may not call it.
...
...
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