Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session.index.create fails with engine #420

Closed
Aeonrush opened this issue Dec 10, 2019 · 0 comments
Closed

session.index.create fails with engine #420

Aeonrush opened this issue Dec 10, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@Aeonrush
Copy link
Contributor

Aeonrush commented Dec 10, 2019

Hi
OrientDB Docker image tag: 3.0.25
Orientjs: 3.0.8

Maybe I doing something wrong. I get session from sessions pool

Example

const session = await pool.acquire();
session.index.create({
  name: 'User._username_displayName',
  class: 'User',
  type: 'FULLTEXT',
  engine: 'LUCENE',
  properties: ['username', 'displayName'],
  ifnotexist: true
});

Throws an Error

TypeError: Cannot read property 'escape' of undefined
    at ODatabaseSession.create (/var/www/project/node_modules/orientjs/lib/client/database/idx/index.js:207:35)
    at ODatabaseSession.session.index.get.catch (/var/www/project/src/provider/orientdb/User/UserProvider.js:110:32)

idx/index.js:207:35 has

if (config.engine) {
  query += " ENGINE " + this.db.escape(config.engine);
}

Thanks
Best regards

wolf4ood added a commit that referenced this issue Dec 11, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…with-engine

fix #420
@wolf4ood wolf4ood self-assigned this Dec 11, 2019
@wolf4ood wolf4ood added this to the 3.0.9 milestone Dec 11, 2019
@wolf4ood wolf4ood added the bug label Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants