Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
MariaDB
Commits
0b0d4702
Commit
0b0d4702
authored
17 years ago
by
Rich Prohaska
Browse files
Options
Download
Email Patches
Plain Diff
add Dbc::pget addresses #234
git-svn-id:
file:///svn/tokudb@1430
c7de825b-a66e-492c-adef-691d508d4ae1
parent
7628890f
Changes
3
Hide 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 @
0b0d4702
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
cxx/dbc.cpp
View file @
0b0d4702
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
include/db_cxx.h
View file @
0b0d4702
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand 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