TanmoySG / wunderDB

A micro JSON-based Data Store inspired by MongoDB.
http://wdb.tanmoysg.com/api/
Apache License 2.0
13 stars 0 forks source link

[🛠️] Minor Issues and Enhancements Backlog #29

Open TanmoySG opened 1 year ago

TanmoySG commented 1 year ago

This Issue tracks some identified minor Issues and Enhancements that can be picked up in future.

TanmoySG commented 1 year ago

Enhancements to Filter

If filters can be send as JSON then the type can also be checked and taken into account while filtering and we can use a type-full/type-respective data comparison instead of a type-less/type-irrespective data comparison in data filtering

image

TanmoySG commented 1 year ago

How mongoDb data Updates work

https://database.guide/how-to-remove-a-field-from-a-mongodb-document-unset/

TanmoySG commented 1 year ago

Expand docker build to more platforms/archs

https://docs.docker.com/build/building/multi-platform/

TanmoySG commented 1 year ago

Importable Packages from wunderDB (for Go)

TanmoySG commented 1 year ago

Fix Lint Issues

internal/roles/roles.go:209:16: Error return value of `json.Unmarshal` is not checked (errcheck)
        json.Unmarshal(mergedGrantBytes, &privileges)
                      ^
internal/wfs/unloader.go:18:12: Error return value of `os.Create` is not checked (errcheck)
                os.Create(w.namespacesBasePath)
                         ^
internal/wfs/unloader.go:35:12: Error return value of `os.Create` is not checked (errcheck)
                os.Create(w.databasesBasePath)
                         ^
internal/wfs/unloader.go:52:12: Error return value of `os.Create` is not checked (errcheck)
                os.Create(w.rolesBasePath)
                         ^
internal/server/middlewares/recovery/recovery.go:90:12: Error return value of `c.Send` is not checked (errcheck)
                                        c.Send(r.Marshal())
                                              ^
internal/server/handlers/common.go:70:8: Error return value of `c.Send` is not checked (errcheck)
        c.Send(marshaledResponse)
              ^
internal/users/users.go:9:2: const `tokenAuthentication` is unused (unused)
        tokenAuthentication    = "token"
        ^
internal/users/users.go:8:2: const `passwordAuthentication` is unused (unused)
        passwordAuthentication = "password"
        ^
internal/wfs/loader.go:88:6: func `loadEntity` is unused (unused)
func loadEntity(entityPath string, entity any) (any, error) {
     ^
internal/server/lifecycle/shutdown/shutdown.go:18:3: S1005: unnecessary assignment to the blank identifier (gosimple)
                _ = <-ch
TanmoySG commented 1 year ago

Explore in-code execution of tools

This branch https://github.com/TanmoySG/wunderDB/tree/tools-within-code-usage-backup has the required code/sample to run wdb-tools from within code.

Can explore for other purposes