Skip to content

Embedded SQL example outdated and missing MultiDBHandler implementation #2047

Open
@HoneyBBQ

Description

@HoneyBBQ

What happened

The embedded SQL example in the official documentation (https://docs.immudb.io/1.9.5/embedded/embeddingSQL.html) is outdated and doesn't work with immudb v1.9.5. When trying to run the example, I encountered two errors:

  1. illegal state: multi-indexing must be enabled
  2. illegal state: unspecified multidbHanlder

After fixing the first error by enabling multi-indexing:
store.Open("data", store.DefaultOptions().WithMultiIndexing(true))

I found that the SQL engine requires a MultiDBHandler implementation, but:

  1. There's no public implementation of the MultiDBHandler interface in the sql package
  2. No guidance in the documentation about how to implement or use it
  3. The example code doesn't mention this requirement at all

What you expected to happen

  1. The example code in the documentation should work as-is with the current version
  2. If MultiDBHandler is required, the documentation should:
    • Explain this requirement
    • Provide a basic implementation example or point to one
    • Explain when and why it's needed

How to reproduce it (as minimally and precisely as possible)

  1. Create a new Go project
  2. Copy the example code from the documentation
  3. Run the code:

Environment
shell
go1.23.6 darwin/arm64
immudb v1.9.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions