# rpmdb/db3.c File Reference

`#include "system.h"`
`#include <db3/db.h>`
`#include <rpmlib.h>`
`#include <rpmmacro.h>`
`#include <rpmurl.h>`
`#include "rpmdb.h"`
`#include "debug.h"`

Go to the source code of this file.

## Data Structures

struct | dbiHStats_s
| Hash database statistics. More...
struct | dbiBStats_s
| B-tree database statistics. More...

## Functions

static int | cvtdberr (dbiIndex dbi, const char *msg, int error, int printit)
static int | db_fini (dbiIndex dbi, const char *dbhome, const char *dbfile, const char *dbsubfile)
static int | db3_fsync_disable (int fd)
static int | db_init (dbiIndex dbi, const char *dbhome, const char *dbfile, const char *dbsubfile, DB_ENV **dbenvp)
static int | db3sync (dbiIndex dbi, unsigned int flags)
static int | db3c_del (dbiIndex dbi, DBC *dbcursor, u_int32_t flags)
static int | db3c_dup (dbiIndex dbi, DBC *dbcursor, DBC **dbcp, u_int32_t flags)
static int | db3c_get (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *data, u_int32_t flags)
static int | db3c_put (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *data, u_int32_t flags)
static int | db3c_close (dbiIndex dbi, DBC *dbcursor)
static int | db3c_open (dbiIndex dbi, DBC **dbcp, int dbiflags)
static int | db3cclose (dbiIndex dbi, DBC *dbcursor, unsigned int flags)
static int | db3copen (dbiIndex dbi, DBC **dbcp, unsigned int flags)
static int | db3cput (dbiIndex dbi, DBC *dbcursor, const void *keyp, size_t keylen, const void *datap, size_t datalen, unsigned int flags)
static int | db3cdel (dbiIndex dbi, DBC *dbcursor, const void *keyp, size_t keylen, unsigned int flags)
static int | db3cget (dbiIndex dbi, DBC *dbcursor, void **keyp, size_t *keylen, void **datap, size_t *datalen, unsigned int flags)
static int | db3ccount (dbiIndex dbi, DBC *dbcursor, unsigned int *countp, unsigned int flags)
static int | db3byteswapped (dbiIndex dbi)
static int | db3stat (dbiIndex dbi, unsigned int flags)
static int | db3close (dbiIndex dbi, unsigned int flags)
static int | db3open (rpmdb rpmdb, int rpmtag, dbiIndex *dbip)

## Variables

static int | _debug = 1
struct _dbiVec | db3vec

## Detailed Description

Definition in file db3.c.

## Function Documentation

static int cvtdberr | ( | dbiIndex | dbi,
|  | const char * | msg,
|  | int | error,
|  | int | printit |
| ) |  |  | `[static]`

Definition at line 89 of file db3.c.

static int db3_fsync_disable | ( | int | fd | ) | `[static]`

Definition at line 154 of file db3.c.

static int db3byteswapped | ( | dbiIndex | dbi | ) | `[static]`

Definition at line 611 of file db3.c.

static int db3c_close | ( | dbiIndex | dbi,
|  | DBC * | dbcursor |
| ) |  |  | `[inline, static]`

Definition at line 381 of file db3.c.

static int db3c_del | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | u_int32_t | flags |
| ) |  |  | `[static]`

Definition at line 318 of file db3.c.

static int db3c_dup | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | DBC ** | dbcp,
|  | u_int32_t | flags |
| ) |  |  | `[static]`

Definition at line 329 of file db3.c.

static int db3c_get | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | DBT * | key,
|  | DBT * | data,
|  | u_int32_t | flags |
| ) |  |  | `[static]`

Definition at line 344 of file db3.c.

static int db3c_open | ( | dbiIndex | dbi,
|  | DBC ** | dbcp,
|  | int | dbiflags |
| ) |  |  | `[inline, static]`

Definition at line 394 of file db3.c.

static int db3c_put | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | DBT * | key,
|  | DBT * | data,
|  | u_int32_t | flags |
| ) |  |  | `[static]`

Definition at line 368 of file db3.c.

static int db3cclose | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 418 of file db3.c.

static int db3ccount | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | unsigned int * | countp,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 593 of file db3.c.

static int db3cdel | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | const void * | keyp,
|  | size_t | keylen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 506 of file db3.c.

static int db3cget | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | void ** | keyp,
|  | size_t * | keylen,
|  | void ** | datap,
|  | size_t * | datalen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 541 of file db3.c.

static int db3close | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 657 of file db3.c.

static int db3copen | ( | dbiIndex | dbi,
|  | DBC ** | dbcp,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 446 of file db3.c.

static int db3cput | ( | dbiIndex | dbi,
|  | DBC * | dbcursor,
|  | const void * | keyp,
|  | size_t | keylen,
|  | const void * | datap,
|  | size_t | datalen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 474 of file db3.c.

static int db3open | ( | rpmdb | rpmdb,
|  | int | rpmtag,
|  | dbiIndex * | dbip |
| ) |  |  | `[static]`

Definition at line 805 of file db3.c.

static int db3stat | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 631 of file db3.c.

static int db3sync | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 302 of file db3.c.

static int db_fini | ( | dbiIndex | dbi,
|  | const char * | dbhome,
|  | const char * | dbfile,
|  | const char * | dbsubfile |
| ) |  |  | `[static]`

Definition at line 112 of file db3.c.

static int db_init | ( | dbiIndex | dbi,
|  | const char * | dbhome,
|  | const char * | dbfile,
|  | const char * | dbsubfile,
|  | DB_ENV ** | dbenvp |
| ) |  |  | `[static]`

Definition at line 161 of file db3.c.

## Variable Documentation

int _debug = 1`[static]`

Definition at line 7 of file db3.c.