Created
July 18, 2018 19:24
-
-
Save gabidavila/3d808fa37ef296aade839ceb139dfd68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mysqlx = require('@mysql/xdevapi'); | |
const options = require('./config') | |
mysqlx.getSession(options) | |
.then((session) => { | |
const db = session.getSchema("worldcup"); | |
let teamsCollection = db.getCollection("teams_2018"); | |
return teamsCollection.find("name = :country1 OR name = :country2") | |
.bind("country1", "Brazil") | |
.bind("country2", "England") | |
.execute(console.log) | |
}) | |
.catch(err => { | |
console.log(err.stack); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment