A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/demo1_8cpp_source.html below:

NCBI C++ ToolKit: src/db/bdb/demo/demo1.cpp Source File

86

dbf.

phone

=

"+1(240)123456"

;

92

cout <<

"Insert failed!"

<< endl;

99

dbf.

phone

=

"(240)234567"

;

103

cout <<

"Insert failed!"

<< endl;

113

cout <<

"Insert failed!"

<< endl;

126

cout <<

"NULL"

<< endl;

128

cout << (

const char

*) rec.

first_name

<< endl;

133

cout <<

"NULL"

<< endl;

135

cout << (

const char

*) rec.

last_name

<< endl;

140

cout <<

"NULL"

<< endl;

147

cout <<

"NULL"

<< endl;

149

cout << (

const char

*) rec.

phone

<< endl;

170  unsigned int

recs_fetched = 0;

172

cout <<

"===================================="

<< endl;

176

cout <<

"===================================="

<< endl;

177

cout <<

"Records found:"

<< recs_fetched << endl;

199

d->SetUsageContext(

"bdb demo1"

,

200  "Demo1 application for BDB library"

);

214

cout <<

"Error! DBD errno exception:"

<< ex.what();

219

cout <<

"Error! DBD library exception:"

<< ex.what();

227 int main

(

int

argc,

const char

* argv[])

Berkeley BDB file cursor.

BDB errno exception class.

String field type designed to work with C-strings (ASCIIZ)

Berkeley DB file cursor class.

void Init(void)

Initialize the application.

int Run(void)

Run the application.

const char * s_PhoneBookDBFileName

int main(int argc, const char *argv[])

void PrintRecord(const SPhoneBookDB &rec)

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

@ eNotNullable

Value cannot be null.

void SetCondition(ECondition cond_from, ECondition cond_to=eNotSet)

Set search condition(type of interval)

void Open(const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)

Open file with specified access mode.

EBDB_ErrCode Insert(EAfterWrite write_flag=eDiscardData)

Insert new record.

void BindKey(const char *field_name, CBDB_Field *key_field, size_t buf_size=0)

void BindData(const char *field_name, CBDB_Field *data_field, size_t buf_size=0, ENullable is_null=eNullable)

EBDB_ErrCode

BDB Return codes.

EBDB_ErrCode Fetch(EFetchDirection fdir=eDefault)

Fetch record.

@ eCreate

implies 'eReadWrite' too

bool IsNull() const

Return TRUE if field is NULL.

const string & GetName() const

Return symbolic name for the field.

void SetDiagPostFlag(EDiagPostFlag flag)

Set the specified flag (globally).

EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)

Set the threshold severity for posting the messages.

@ eDPF_File

File name (not full path)

@ eDiag_Warning

Warning message.

int32_t Int4

4-byte (32-bit) signed integer

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

CBDB_FieldString first_name

CBDB_FieldString last_name


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4