Categorygithub.com/attumm/lambdadb
modulepackage
0.0.0-20250222224238-194cedbfd0a0
Repository: https://github.com/attumm/lambdadb.git
Documentation: pkg.go.dev

# README

LambdaDB

In memory database that uses filters to get the data you need.

Can be used for your needs by changing the models.go file to your needs. Creating and registering of the functionality that is needed.

Example

LambdaDB loaded with dataset from imdb at around 7 million items. Frontend of LambdaDB shows the database in action.

LambdaDB

Steps

You can start the database with only a csv. Go over steps below, And see the result in your browser.

  1. python3 extras/create_model.py -f <path_to_file> ../model.go
  2. go fmt
  3. go build
  4. ./lambdadb --help
  5. python3 extras/ingestion.py -f <path_to_file>
  6. curl 127.0.0.1:8128/help/
  7. browser http://127.0.0.1:8128/
  8. examples curl 127.0.0.1:8128/help/ | python3 -m json.tool

Create Snapshot

http://127.0.0.1:8128/mgmt/save

Load Snapshot

http://127.0.0.1:8128/mgmt/load

Use index

Currently the index is on all the columns. To run the index start lambdadb with indexed. Create a snapshot of the current data compressed.

  1. http://127.0.0.1:8128/mgmt/save/bytesz
  2. ./lambda_db -indexed
  3. http://127.0.0.1:8128/mgmt/load/bytesz

Run

sudo docker-compose up --no-deps --build

promql {instance="lambdadb:8000"}

python3 extras/ingestion.py -f movies_subset.tsv -format tsv -dbhost 127.0.0.1:8000

# Packages

Package main provides a tool for generating Go code based on input data structures.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
contain filters.
match filters.
startswith filters.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
getters.
No description provided by the author
No description provided by the author
No description provided by the author
NewProgressBar initializes new progress bar based on size of file.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
No description provided by the author
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
No description provided by the author
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.
Colors are fun, and can be used to note that this is joyfull and fun project.

# Variables

make an index on column values in dataset.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Other wise also known in mathematics as set but in http name it would be confused with the verb set.func UniqueValuesInColumn(w http.ResponseWriter, r *http.Request) { column := r.URL.Path[1:] response := make(map[string]string) if len(ITEMS) == 0 { response["message"] = fmt.Sprint("invalid input: ", column) w.WriteHeader(400) json.NewEncoder(w).Encode(response) return } validColumns := ITEMS[0].Columns() if !validColumn(column, validColumns) { w.WriteHeader(400) response["message"] = fmt.Sprint("invalid input: ", column) response["input"] = column response["valid input"] = strings.Join(validColumns, ", ") json.NewEncoder(w).Encode(response) return } set := make(map[string]bool) for item := range ITEMS { r := reflect.ValueOf(item) value := reflect.Indirect(r).FieldByName(column) valu set[value.Str()] = true } }.

# Type aliases

No description provided by the author
Items as Example.
No description provided by the author