Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dominique Sandoz
    @streunerlein
    hellboy81
    @hellboy81
    OK, its clear, In body object from uploaded handler is returned the most actual revison of the document
    Isn't it?
    wir können auch Deutsch sprechen ;-)
    Dominique Sandoz
    @streunerlein
    yes, it is - but in case of an error, body will be null
    No, let's go with english, as this is a public channel and other people may want to profit from our discussion
    aber danke :)
    hellboy81
    @hellboy81
    Jetzt alle müssen Deutsch lernen ;-)
    Habe noch eine Frage: wenn db.insert ein nicht-leereserr - Objekt zurückgibt, dies bedeutet automatisch, dass ok == false und umgekehrt kein Error - ok ist immer true
    ?
    Dominique Sandoz
    @streunerlein
    @hellboy81 I'll gladly answer your questions when you state it in english :)
    *them
    hellboy81
    @hellboy81

    OK, at the moment I have following problem:

    I am trying to implement attachment upload in the right way.

    As I mentioned I should do it in following steps

    • db.get - Get document (existing or not existing)
      • db.insert - If document not exists
    • db.attachment.insert - Insert attachment
      • If attachment upload success:
        - db.get to get the updated versions (with `_attachments`)
        - Add additional custom attachment meta data to the document 
        - db.insert - Save updated document

    Can you verify it?

    hellboy81
    @hellboy81
    @streunerlein
    hellboy81
    @hellboy81
    OK, As I mentioned I should ALWAYS handle 409 error (Document update conflict)
    hellboy81
    @hellboy81
    dscape/nano#295
    Is there db.attachment.head implementation?
    steinfernandez
    @steinfernandez
    Hello - could someone clarify the right way to pass the params argument to db.view? Nothing I try seems to be working - I always get the unfiltered results of the view. Thanks!
    steinfernandez
    @steinfernandez
    passing it as { key:[username]} managed to filter out literally everything including the relevant results, which is different but not quite what i want
    Steven Van Eenoo
    @StevenVanEenoo
    Since v6.x passing in a url requires it to be https? Therefor require('nano')('http://localhost:5984/foo'); fails. Is this the expected behavior and we should all use https now?
    Guido Villaverde
    @limoragni
    Hello everyone! Anyone know how can I logout from couchdb. In the docs it says how to login using nano.auth. But there's nothing about loging out
    Tri Nguyen
    @tnguyen14
    does nano support a promise-based interface?
    hellboy81
    @hellboy81
    which nano version should be used with node 4.2.6
    ?
    hellboy81
    @hellboy81

    @dscape

    As I mentioned in nano there is no db.head

    And the best way to ensure that

    • CouchDB is online
    • Database is available (exists)

    it to create it?

    Ghost
    @ghost~53f636c6163965c9bc1ff9a5
    does nano uses promises?
    William Hetherington
    @willwh
    hi guys
    I’m trying to understand search
    can I search a field for instances of a string and return the doc?
    is that how that works?
    logs: (thing, callback) => {
          nano.db.use(‘mydb').search('log', 'logs', { message: ’searchstring’}, (err, data) => {
          callback(err, data);
        });
      },
    where I have a field in my logs view called message
    Error: missing handler: _search
    so I guess I am doing something wrong
    hmm
    William Hetherington
    @willwh
    ah I misunderstood
    William Hetherington
    @willwh
    @dscape ping
    Matt Crummey
    @mcrummey
    @tnguyen14 @felixsanz nano does not support promises. There are several wrappers that do.
    Tri Nguyen
    @tnguyen14
    @mcrummey do you recommend any of them?
    Tri Nguyen
    @tnguyen14
    ok thanks, I'll take a look
    Matt Crummey
    @mcrummey
    for promises and generators(async/await)
    rwanyoike
    @rwanyoike
    hello. i'm trying to understand nano tests. I don't have a JS background, but I note that nano uses a mock lib. How are the functions tested? Is it using a real couchdb, or mocking responses, etc. Thanks.
    Matt Crummey
    @mcrummey
    Hey Raymond, it looks like they have both mocked and unmocked tests.
    npm run mocked && npm run unmocked
    "npm test" runs the unmocked tests
    John Pape
    @jpapejr
    Speaking of testing… I’m looking for a simple way to check for the presence of a specific database in couch for a mocha test.. Any ideas? db.head? db.use() then something?
    David Brown
    @browndav
    In https://github.com/dscape/nano/blob/master/lib/nano.js#L64, it looks like (.*)@ is used to match the text up until the first occurrence of @ instead of the non-greedy (.*?)@. Seems reminiscent of the recent Lastpass vulnerability (e.g. https://foo:bar@host/foo/bar/@quux), though I can't see any way to exploit it beyond potentially hiding URL contents in logs. Was going to file, but figured I should pop in here first to see if I'm missing something.
    Jelani Thompson
    @JelaniThompson
    Hey there! I'm making a database with nano currently
    The current approach I'm taking with making user accounts is to create a new document in the users database