pazpar2  1.14.1
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_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

◆ pazpar2_database_criterion_type

Enumerator
PAZPAR2_STRING_MATCH 
PAZPAR2_SUBSTRING_MATCH 

Definition at line 39 of file database.c.

Function Documentation

◆ create_database_criterion()

static struct database_criterion* create_database_criterion ( NMEM  m,
const char *  buf 
)
static

◆ create_database_for_service()

struct database* create_database_for_service ( const char *  id,
struct conf_service service 
)

◆ database_match_criteria()

static int database_match_criteria ( struct setting **  settings,
int  num_settings,
struct conf_service service,
struct database_criterion cl 
)
static

◆ match_criterion()

static int match_criterion ( struct setting **  settings,
int  num_settings,
struct conf_service service,
struct database_criterion c 
)
static

◆ match_zurl()

int match_zurl ( const char *  zurl,
const char *  pattern 
)

Definition at line 110 of file database.c.

Referenced by match_criterion(), and update_database_fun().

◆ new_database_inherit_settings()

struct database* new_database_inherit_settings ( const char *  id,
NMEM  nmem,
struct settings_array service_settings 
)

◆ predef_grep_databases()

int predef_grep_databases ( void *  context,
struct conf_service service,
void(*)(void *context, struct database *db)  fun 
)

◆ session_grep_databases()

int session_grep_databases ( struct session se,
const char *  filter,
void(*)(struct session *se, struct session_database *db)  fun 
)