Giter Site home page Giter Site logo

level-fact-base's People

Contributors

farskipper avatar miguelsm avatar simontegg avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar

level-fact-base's Issues

A few questions

Very cool library!
I just have a few questions if you don't mind:

  1. Can you point me to where in the source the join magic happens?
  2. The examples show equality-based queries. Are there plans to support other operators like > < etc?

"Error: can only encode arrays" with "Date" type

I get an "Error can only encode arrays" when passing a Date object as a value. When I call .toISOString() on the Date I get the validation error from src/schemaTypes.js

I believe the issue is here https://github.com/dominictarr/charwise/blob/master/codec/object.js#L40

    function encodeItem(item) {
        if (typeof item === 'object') {
            return encode(item);
        }
        return escape(codec.encode(item));
}

charwise just tests for objects, evaluating true for Date then passes it to a function that expects an array.

Stacktrace follows

 node index.js
Error: can only encode arrays
    at encode (/home/simon/projects/lfb/node_modules/charwise/codec/object.js:27:44)
    at encodeItem (/home/simon/projects/lfb/node_modules/charwise/codec/object.js:41:20)
    at Object.encode (/home/simon/projects/lfb/node_modules/charwise/codec/object.js:33:24)
    at Object.exports.encode (/home/simon/projects/lfb/node_modules/charwise/index.js:39:28)
    at Codec.encodeKey (/home/simon/projects/lfb/node_modules/level-codec/index.js:32:45)
    at /home/simon/projects/lfb/node_modules/level-codec/index.js:53:17
    at Array.map (native)
    at Codec.encodeBatch (/home/simon/projects/lfb/node_modules/level-codec/index.js:50:14)
    at DB._batch (/home/simon/projects/lfb/node_modules/encoding-down/index.js:71:20)
    at DB.AbstractLevelDOWN.batch (/home/simon/projects/lfb/node_modules/abstract-leveldown/abstract-leveldown.js:181:8)
    at LevelUP.batch (/home/simon/projects/lfb/node_modules/levelup/lib/levelup.js:255:11)
    at transact (/home/simon/projects/lfb/node_modules/level-fact-base/src/index.js:126:6)
    at /home/simon/projects/lfb/node_modules/level-fact-base/src/index.js:234:7
    at Object.push (/home/simon/projects/lfb/node_modules/fastq/queue.js:88:14)
    at /home/simon/projects/lfb/node_modules/level-fact-base/src/index.js:344:19
    at onLoad (/home/simon/projects/lfb/node_modules/level-fact-base/src/index.js:308:7)
    at Object.transact (/home/simon/projects/lfb/node_modules/level-fact-base/src/index.js:342:7)
    at main (/home/simon/projects/lfb/index.js:85:6)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7) undefined

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.