Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

pbs_db_conn_t: Structure used to maintain the database connection information. All elements of this structure are generic and are not bound to any particular database.

Code Block
struct pbs_db_connection {

...


  void    *conn_db_handle;        /* opaque database handle  */

...


  char    *conn_host;             /* host */

...


  int     conn_port;		  /* port

...

 */
  int     conn_timeout;           /* connection timeout (async connects) */

...


  int     conn_state;

...

             /* connected? */
  int     conn_db_state;          /* db up? down? starting? (async connects) */

...


  time_t  conn_connect_time;

...

      /* when was connection initiated */
  int     conn_trx_nest;          /* incr/decr with each begin/end trx */

...


  int     conn_trx_rollback;      /* rollback flag in case of nested trx */

...


  int     conn_trx_async;	  /* 1 - async, 0 - sync, one-shot reset */

...


  void    *conn_db_err;           /* opaque database error store */

...


  void    *conn_data;             /* any other db specific data

...

 */
}
typedef struct pbs_db_connection pbs_db_conn_t;

pbs_db_obj_info_t: Wrapper object structure. It contains a pointer to one of the several database structures. Most of the database manipulation/query functions take this structure as a parameter. Depending on the contained structure type, an appropriate internal database manipulation/query function is eventually called. This allows keeping the interface simpler and generic.

...