bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

upgrading to use enterprise-7.0.0-beta with ottoman@2.0.0-alpha.10 #35

Closed bwgjoseph closed 3 years ago

bwgjoseph commented 3 years ago

Hi,

Is there anything that I need to change to be able to use it?

I setup enterprise-7.0.0-beta with ottoman@2.0.0-alpha.10 to try out but seem like there's issue creating new doc but the connection seem fine.

In my initialize code as seen in https://github.com/bwgjoseph/mongoose-vs-ottoman/blob/3dfa9c5480f5d504772490509ec66119bdbe19cf/test/ts/setup/global.setup.ts#L17-L30

This is the output for removeDocuments

{
  meta: {
    requestId: '3a4f87d4-74b4-4fcb-945b-f8a53495fee2',
    clientContextId: 'ff400bfbc9f76ccc',
    status: 'success',
    signature: null,
    profile: undefined,
    metrics: {
      elapsedTime: 1.0546,
      executionTime: 0.9942000000000001,
      sortCount: undefined,
      resultCount: 0,
      resultSize: 0,
      mutationCount: undefined,
      errorCount: undefined,
      warningCount: undefined
    }
  },
  rows: []
}

Based on that, I'm guessing the connection and query seem be working fine

So I went ahead to run my create test https://github.com/bwgjoseph/mongoose-vs-ottoman/blob/3dfa9c5480f5d504772490509ec66119bdbe19cf/test/ts/create.test.ts#L19-L34

I kept getting timeout error

test create function
    √ mongoose - should create new doc (84ms)
    1) ottoman - should create new doc

  1 passing (2s)
  1 failing

  1) test create function
       ottoman - should create new doc:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (Z:\mongoose-vs-ottoman\test\ts\create.test.ts)
      at listOnTimeout (internal/timers.js:549:17)
      at processTimers (internal/timers.js:492:7)

npm ERR! Test failed.  See above for more details.

Is there something that has to change for this to work with the new 7.0-beta?


I am also referring to the example here in https://github.com/httpJunkie/ottoman-examples/tree/master/examples-7-zero, more specifically - scenario-default-implied.js where the initialize is declared as

const { Ottoman } = require('ottoman')
var ottoman = new Ottoman({ })

How is it different from the way I declare it? Or it's both the same?

import * as ottoman from 'ottoman';
ottoman.connect({
        connectionString: 'couchbase://localhost',
        bucketName: 'testBucket',
        username: 'user',
        password: 'password'
});

Thank you

httpJunkie commented 3 years ago

the scope/collection changes are not in the alpha.10 When we publish a new version alpha.11 this should be available later today. I will update this message when it's released.

httpJunkie commented 3 years ago

We have released a new version of our Ottoman NPM package alpha.11 Documentation site updated and available at: v2.ottomanjs.com

Changelog: PROJ MAINT: Bump ini from 1.3.5 to 1.3.8 ADDED FEAT: Support for findOneAndUpdate() CHANGE FEAT: Rename update() method to updateById() ADDED FEAT: Provide updateMany() Support ADDED FEAT: Provide removeMany() Support ADDED FEAT: Make Ottoman work with Scopes and Collection PROJ MAINT: Bump highlight.js from 10.4.0 to 10.4.1 BUG FIX: Fix Date-String format comparison in BETWEEN Operator

bwgjoseph commented 3 years ago

Create new issue #36 to track, will close this