pazpar2  1.13.0
Data Structures | Enumerations | Functions
database.c File Reference
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <yaz/log.h>
#include <yaz/nmem.h>
#include "ppmutex.h"
#include "session.h"
#include "pazpar2_config.h"
#include "settings.h"
#include "http.h"
#include "database.h"

Go to the source code of this file.

Data Structures

struct  database_criterion_value
 
struct  database_criterion
 

Enumerations

enum  pazpar2_database_criterion_type { PAZPAR2_STRING_MATCH, PAZPAR2_SUBSTRING_MATCH }
 

Functions

struct databasenew_database (const char *id, NMEM nmem)
 
struct databasenew_database_inherit_settings (const char *id, NMEM nmem, struct settings_array *service_settings)
 
struct databasecreate_database_for_service (const char *id, struct conf_service *service)
 
int match_zurl (const char *zurl, const char *pattern)
 
static int match_criterion (struct setting **settings, int num_settings, struct conf_service *service, struct database_criterion *c)
 
static struct database_criterioncreate_database_criterion (NMEM m, const char *buf)
 
static int database_match_criteria (struct setting **settings, int num_settings, struct conf_service *service, struct database_criterion *cl)
 
int session_grep_databases (struct session *se, const char *filter, void(*fun)(struct session *se, struct session_database *db))
 
int predef_grep_databases (void *context, struct conf_service *service, void(*fun)(void *context, struct database *db))
 

Enumeration Type Documentation

Enumerator
PAZPAR2_STRING_MATCH 
PAZPAR2_SUBSTRING_MATCH 

Definition at line 39 of file database.c.

Function Documentation

static struct database_criterion* create_database_criterion ( NMEM  m,
const char *  buf 
)
static
struct database* create_database_for_service ( const char *  id,
struct conf_service service 
)
static int database_match_criteria ( struct setting **  settings,
int  num_settings,
struct conf_service service,
struct database_criterion cl 
)
static
static int match_criterion ( struct setting **  settings,
int  num_settings,
struct conf_service service,
struct database_criterion c 
)
static
int match_zurl ( const char *  zurl,
const char *  pattern 
)

Definition at line 114 of file database.c.

Referenced by match_criterion(), and update_database_fun().

struct database* new_database ( const char *  id,
NMEM  nmem 
)

Definition at line 57 of file database.c.

References new_database_inherit_settings().

struct database* new_database_inherit_settings ( const char *  id,
NMEM  nmem,
struct settings_array service_settings 
)
int predef_grep_databases ( void *  context,
struct conf_service service,
void(*)(void *context, struct database *db)  fun 
)
int session_grep_databases ( struct session se,
const char *  filter,
void(*)(struct session *se, struct session_database *db)  fun 
)