MySQL 9.1.0
Source Code Documentation
completion_hash.h File Reference
#include <sys/types.h>
#include "my_alloc.h"
#include "my_sys.h"

Go to the source code of this file.

Classes

struct  _entry
 
struct  bucket
 
struct  hashtable
 

Macros

#define SUCCESS   0
 
#define FAILURE   1
 

Typedefs

typedef struct _entry entry
 
typedef struct bucket Bucket
 
typedef struct hashtable HashTable
 

Functions

int completion_hash_init (HashTable *ht, uint nSize)
 
int completion_hash_update (HashTable *ht, const char *arKey, uint nKeyLength, const char *str)
 
int hash_exists (HashTable *ht, char *arKey)
 
Bucketfind_all_matches (HashTable *ht, const char *str, uint length, uint *res_length)
 
Bucketfind_longest_match (HashTable *ht, char *str, uint length, uint *res_length)
 
void add_word (HashTable *ht, const char *str)
 
void completion_hash_clean (HashTable *ht)
 
int completion_hash_exists (HashTable *ht, char *arKey, uint nKeyLength)
 
void completion_hash_free (HashTable *ht)
 

Macro Definition Documentation

◆ FAILURE

#define FAILURE   1

◆ SUCCESS

#define SUCCESS   0

Typedef Documentation

◆ Bucket

typedef struct bucket Bucket

◆ entry

typedef struct _entry entry

◆ HashTable

typedef struct hashtable HashTable

Function Documentation

◆ add_word()

void add_word ( HashTable ht,
const char *  str 
)

◆ completion_hash_clean()

void completion_hash_clean ( HashTable ht)

◆ completion_hash_exists()

int completion_hash_exists ( HashTable ht,
char *  arKey,
uint  nKeyLength 
)

◆ completion_hash_free()

void completion_hash_free ( HashTable ht)

◆ completion_hash_init()

int completion_hash_init ( HashTable ht,
uint  nSize 
)

◆ completion_hash_update()

int completion_hash_update ( HashTable ht,
const char *  arKey,
uint  nKeyLength,
const char *  str 
)

◆ find_all_matches()

Bucket * find_all_matches ( HashTable ht,
const char *  str,
uint  length,
uint *  res_length 
)

◆ find_longest_match()

Bucket * find_longest_match ( HashTable ht,
char *  str,
uint  length,
uint *  res_length 
)

◆ hash_exists()

int hash_exists ( HashTable ht,
char *  arKey 
)