0.6.11 • Published 4 months ago

@tty-pt/qhash v0.6.11

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
4 months ago

libqhash

A library for easy C hashtables

Check the header file or language server for more information.

struct idm_list

Is a singly-linked list of unsigned numbers used for id management. It provides basic push and pop functionality.

struct idm

Is a structure for id management. Basically a "last" id, and an idm_list of free ids.

hash

General hashtable functions are prefixed with "hash_" and they alone allow for most of the things you will need.

Many others are just provided for easy use.

uhash

Is a hashtable in which keys are unsigned ints.

lhash

Is a uhash, but they also have automatic id management capabilities.

ahash

Is a uhash in which values are also unsigned. Its purpose is to have easy n to n associations.

shash

A hashtable in which keys are strings.

suhash

You guessed it. Keys are strings, values are unsigned.

sphash

String to pointer.

ushash

Unsigned to string.

qhash

A binary for easy and fast hashtables / indexes. It provides most common use-cases.

Usage

For help:

qhash -?

This will you a listing of ids and pet owner names:

qhash -l owners.db

This will put a pet owner into the database, and output his id:

qhash -p Mathew owners.db # example output: 4

Then insert pets into the pet database:

qhash -p cat -p dog pets.db # example output: 2 and 3

And finally create a database that says that Mathew owns both:

qhash -m1 -p 4:2 -p 4:3 assoc.db

Or list all of Mathew's pets (names included):

qhash -a pets.db -g4 assoc.db

And now get a random pet name that corresponds to Mathew:

qhash -q owners.db -a pets.db -RMathew assoc.db # example output: dog
0.6.10

4 months ago

0.6.11

4 months ago

0.6.0

5 months ago

0.5.32

6 months ago

0.5.33

6 months ago

0.5.34

6 months ago

0.5.35

5 months ago

0.5.30

6 months ago

0.5.31

6 months ago

0.5.29

6 months ago

0.5.27

6 months ago

0.5.28

6 months ago

0.5.25

6 months ago

0.5.26

6 months ago

0.5.23

6 months ago

0.5.24

6 months ago

0.5.10

7 months ago

0.5.11

7 months ago

0.5.18

7 months ago

0.5.19

7 months ago

0.5.16

7 months ago

0.5.17

7 months ago

0.5.14

7 months ago

0.5.15

7 months ago

0.5.12

7 months ago

0.5.13

7 months ago

0.5.4

7 months ago

0.5.3

7 months ago

0.5.6

7 months ago

0.5.5

7 months ago

0.5.2

7 months ago

0.5.1

7 months ago

0.5.8

7 months ago

0.5.7

7 months ago

0.5.9

7 months ago

0.5.21

7 months ago

0.5.20

7 months ago

0.5.0

7 months ago

0.4.1

7 months ago

0.3.28

7 months ago

0.4.0

7 months ago

0.3.27

8 months ago

0.3.26

8 months ago

0.3.25

9 months ago

0.3.24

9 months ago

0.3.23

9 months ago

0.3.22

9 months ago

0.3.21

9 months ago

0.3.20

9 months ago

0.3.17

9 months ago

0.3.16

9 months ago

0.3.15

9 months ago

0.3.14

9 months ago

0.3.13

9 months ago

0.3.18

9 months ago

0.3.9

9 months ago

0.3.11

9 months ago

0.3.10

9 months ago

0.3.8

9 months ago

0.3.6

9 months ago

0.3.7

9 months ago

0.3.0

10 months ago

0.3.5

9 months ago

0.3.2

9 months ago

0.3.1

9 months ago

0.3.4

9 months ago

0.3.3

9 months ago

0.2.12

11 months ago

0.2.11

11 months ago

0.2.10

11 months ago

0.2.9

11 months ago

0.2.8

11 months ago

0.2.7

11 months ago

0.2.3

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.2.2

11 months ago

0.1.3

11 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago

0.0.5

12 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago