Giter Site home page Giter Site logo

ldb's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ldb's Issues

Move methods out of ldb.cc

In lev, things got ugly for a while because each feature/command grew in complexity. It would be nice to just start off with each feature/command in it's own file.

build fails due to incorrect location of libleveldb.a

This is on Debian Jessie/Sid, with Linux kernel 4.0.0 on amd64.

g++ -o ldb ldb.cc ./lib/*.cc -I./deps/leveldb/include -std=gnu++11 -lpthread ./deps/leveldb/libleveldb.a -lsnappy ./linenoise.o
g++: error: ./deps/leveldb/libleveldb.a: No such file or directory
Makefile:28: recipe for target 'ldb' failed
make: *** [ldb] Error 1

I can see that the libleveldb.a file is not in the deps/leveldb directory, but one level down, in the out-static directory:

~/src/ldb$ ls deps/leveldb/
AUTHORS          build_detect_platform*  db/   helpers/  issues/  Makefile  out-shared/  port/      table/  util/
build_config.mk  CONTRIBUTING.md         doc/  include/  LICENSE  NEWS      out-static/  README.md  TODO
~/src/ldb$ ls deps/leveldb/out-static/libleveldb.a
deps/leveldb/out-static/libleveldb.a

sublevels

The node module level-sublevel gives you a way to fake tables in leveldb, which is nice. It lets you pick a separator or defaults to \xff, then only iterates keys according to the currently selected prefix. It might be nice to make a c++ version of sublevel... Thoughts?

Non-Blocking --create

Hi there,

I'm interested in using ldb in a bash script. Is there a way I can run ldb ./testdb --create without going into REPL mode?

For example I want to create the db if it doesn't exist and then put a key into it.

But now, ldb ./testdb --create is blocking! :/

Why does README.md tell people to clone from a different private repo?

Why does README.md point to github.com/**0x00a**/ldb.git? Shouldn't it be github.com/**hxoht**/ldb.git?

The 0x00a looks strange and is not explained anywhere. It should at least be explained. The user 0x00a does not appear to be a contributor to this project, and his (I assume?) fork of the project is not public. Given that the official LevelDB homepage (http://leveldb.org) links to this project (the project under which I am posting this issue), I think this should be cleaned up or explained, because it looks potentially untrustworthy.

include linenoise in deps/ ?

Something I've been doing with some clibs is keeping there deps/ in my repo. It will allow a user who doesn't have clibs to use ldb without having to be dep'd on clibs :]

If a user types clib install hij1nx/ldb it will fetch linenoise anyways. If a user clones they will still be fine because linenoise is also there too !

What do you think ?

Parsing puts

After you find the first whitespace, the remainder of the input gets parsed. We need a key and value. That seems simple but keys and values can have anything in them. So the question is, how should we "split" the rest of the value?

Usage example fails

Hi, I'm following the usage example shown here.

Here is my result:

ldb ./db --put foo --value bar
In excecutable 'ldb':
Unrecognized flag/option './db'

Could you provide any tips? I'm interested to write a simple bash script to populate the database, but this is stopping me.


On the other hand, this command actually works:

ldb -i ./db -c

Then, I'm able to successfully do:

> put foo;bar
>
> get foo
bar

gzip format issues - "ldb-0.0.2.tar.gz: not in gzip format"

Machine:- Ubuntu
State:- clib installed successfully.
command "clib -v" shows 1.5.0
When running command "clib install hij1nx/ldb" It says
fetch : hij1nx/ldb:package.json
gzip: ldb-0.0.2.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

Is it due to "ldb-0.0.2.tar.gz" is not a compressed file ?

Build failed on current version OSX

Brew part is ok:
1. brew install snappy
Result:
==> Pouring snappy-1.1.7_1.high_sierra.bottle.tar.gz

2. git Part is ok

3. make install -C ldb its NOT ok
Result:
make -C ./deps/leveldb
make[1]: *** No targets specified and no makefile found. Stop.
make: *** [leveldb] Error 2
Unfortunately I am not a make-scripts expert :-(.
Thx

Segfault on tab completion

The REPL correctly lists a moderately sized leveldb test db:

$ du -hs .
76M     .

But it crashes when I'm about to tab-complete one of the keys:

 $ ldb -i .

> get a
       terminate called after throwing an instance of 'std::regex_error'
                                                                          what():  regex_error
                                                                                              Aborted

Those keys have a format such as:

abu/day/foobaruserid/2015-05-15

unable to build

make on a fresh checkout results in:

[ . . . ]
c++ -I./deps/leveldb/include -std=gnu++11 -stdlib=libc++ -I. -I./include -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX -DSNAPPY -O2 -DNDEBUG        -c port/port_posix.cc -o port/port_posix.o
rm -f libleveldb.a
ar -rs libleveldb.a db/builder.o db/c.o db/db_impl.o db/db_iter.o db/dbformat.o db/filename.o db/log_reader.o db/log_writer.o db/memtable.o db/repair.o db/table_cache.o db/version_edit.o db/version_set.o db/write_batch.o table/block.o table/block_builder.o table/filter_block.o table/format.o table/iterator.o table/merger.o table/table.o table/table_builder.o table/two_level_iterator.o util/arena.o util/bloom.o util/cache.o util/coding.o util/comparator.o util/crc32c.o util/env.o util/env_posix.o util/filter_policy.o util/hash.o util/histogram.o util/logging.o util/options.o util/status.o port/port_posix.o
ar: creating archive libleveldb.a
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ./deps/snappy-1.1.1
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [snappy] Error 2

looks like we're expecting a makefile in ./deps/snappy-1.1.1, but there's nothing there :/

linker failed error on Mac OS

Receiving objects: 100% (21/21), 30.52 KiB | 781.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
c++ -o ldb ldb.cc ./lib/*.cc ./deps/docopt/docopt.cpp -I./deps/leveldb/include -std=gnu++11 -stdlib=libc++ -lpthread -L/usr/local/lib ./deps/leveldb/build/libleveldb.a linenoise.o -lsnappy
ld: library not found for -lsnappy
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ldb] Error 1

Build failed on Ubuntu 14.04

Just build as mentioned in Readme.

g++ -o ldb ldb.cc ./lib/.cc -I./deps/leveldb/include -std=gnu++11 -lpthread -L/usr/local/include ./deps/leveldb/out-static/libleveldb.a linenoise.o
./deps/leveldb/out-static/libleveldb.a(table_builder.o): In function leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder_, leveldb::BlockHandle_)': table_builder.cc:(.text+0x92f): undefined reference to snappy::MaxCompressedLength(unsigned long)'
table_builder.cc:(.text+0x96d): undefined reference tosnappy::RawCompress(char const_, unsigned long, char_, unsigned long_)' ./deps/leveldb/out-static/libleveldb.a(format.o): In function leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)':
format.cc:(.text+0x4d9): undefined reference tosnappy::GetUncompressedLength(char const_, unsigned long, unsigned long_)' format.cc:(.text+0x5ae): undefined reference to snappy::RawUncompress(char const
, unsigned long, char_)'
collect2: error: ld returned 1 exit status
make: *** [ldb] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.