maiha / tokyocabinet.cr

TokyoCabinet client for Crystal
MIT License
2 stars 0 forks source link

Support for in-memory database? ADB #1

Open lumina7 opened 4 years ago

lumina7 commented 4 years ago

https://fallabs.com/tokyocabinet/spex-en.html#tcadbapi

bool tcadbopen(TCADB *adb, const char *name);
    `adb' specifies the abstract database object.
    `name' specifies the name of the database. If it is "*", the database will be an on-memory hash database. If it is "+", the database will be an on-memory tree database.

TokyoCabinet support inmemory dbs, but I don't see any implementation of this. Can it be done? Thank you

antoncom commented 4 years ago

Hello, @lumina7 !

Perhaps, my experience will be useful. I have explored Tokyo Cabinet carefully before start using it in my project. It works as expected for me. Some notes I found earlier:

Have you tried TokyoTyrant network interface as example? -

The only problem I found is TokyoTyrant doesn't work with latest Lua version. But it was easy to fix: https://github.com/antoncom/tokyo-tyrant/issues/1

lumina7 commented 4 years ago

Tokyocabinet does support in-memory dbs, but here the crystal language bindings do not.

This is not a port to tokyocabinet, this git are the bindings.

antoncom commented 4 years ago

@lumina7 Thank you for the reply! Sorry for misunderstanding! Best regards!