Code Monkey home page Code Monkey logo

cushion's People

Contributors

greenkeeperio-bot avatar patrickvenetz avatar pico118 avatar stefanjudis avatar zoddy 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

Watchers

 avatar  avatar  avatar  avatar

cushion's Issues

Parse query parameters

Current behavior:

db.view(
  'emails',
  'all',
  { key : '[email protected]' }
);

makes request:

[info] [<0.4836.0>] 127.0.0.1 - - GET /foo/_design/emails/_view/all?key=hello%2540stefanjudis.de 400

Desired request:

[info] [<0.8878.0>] 127.0.0.1 - - GET /foo/_design/emails/_view/all?key=%[email protected]%22 200

Thx. ๐Ÿ˜

Response in document load/save callback is different

According to documentation the callbacks of the load and save commands at document level are called with a Cushion.document.

Unfortunately the document objects are different.

Cushion.Document in save callback:

{ _id: 'test9',
  _revision: '1-967a00dff5e02add41819138abb3284d',
  _connection:
   { _methodMatch: /^GET|PUT|POST|DELETE|HEAD|COPY$/i,
     _options:
      { host: '127.0.0.1',
        port: '5984',
        username: 'stefan',
        password: 'xxxx',
        secure: false,
        path: '' } },
  _database:
   { _name: 'stefanjudis',
     _connection:
      { _methodMatch: /^GET|PUT|POST|DELETE|HEAD|COPY$/i,
        _options: [Object] } },
  _body: {},
  _error:
   { noId: 'no document id was set',
     noRevision: 'no revision was set',
     noFile: 'could not read file' }
}

Cushion.Document in load callback:

{ _id: 'test9',
  _revision: '1-967a00dff5e02add41819138abb3284d',
  _connection:
   { _methodMatch: /^GET|PUT|POST|DELETE|HEAD|COPY$/i,
     _options:
      { host: '127.0.0.1',
        port: '5984',
        username: 'stefan',
        password: 'xxxx',
        secure: false,
        path: '' } },
  _database:
   { _name: 'stefanjudis',
     _connection:
      { _methodMatch: /^GET|PUT|POST|DELETE|HEAD|COPY$/i,
        _options: [Object] } },
  _body: { _id: 'test9' },
  _error:
   { noId: 'no document id was set',
     noRevision: 'no revision was set',
     noFile: 'could not read file' }
}

The document body is empty in first callback, but in my opinion should include at least the _id but rather be completely the same as the load document for correct chaining purposes.

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.