R
R
RoadToGamedev2020-11-11 22:11:42
go
RoadToGamedev, 2020-11-11 22:11:42

How to store multiple values ​​in boltdb and search through them?

Hello. I am developing a mini web application in which the main calls are read-only.
It is important that it be an embedded db, in the future I am planning a client application.
The choice is between boltdb and sqlite3, but since I want to get rid of cgo, I chose boltdb.
Due to cross compilation (sqlite3 is still like plan B).
The database will have about 10,000 records with a structure.
id (key) \ value ( path (string) | tags (map) | date (datetime) | description (string) )
But the question is, is this the right approach?
Value to make a structure.
And with each request, sort through each element, compare the fields of the structure with the necessary data?
Will it be fast when the database grows to 10,000 fields.
Haven't worked with boltdb and don't know how to properly arrange value with multiple values.

Any advice is welcome!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WinPooh32, 2020-11-12
@WinPooh32

And with each request, sort through each element, compare the fields of the structure with the necessary data?

bolthold
Will it be fast when the database grows to 10,000 fields.

You need to look specifically at your tasks.
In favor of SQLite can be attributed support for sql queries, which allows you to use standard approaches to building a database. For example, you can use the sqlx or gorm mapper .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question