We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
var arangojs = require('arangojs'); const aql = arangojs.aql; const await = arangojs.await; // Const variables for connecting to ArangoDB database const host = '127.0.0.1' const port = '8529' const username = 'root' const password = 'lunamoona' const databasename = 'testDB' // Connection to ArangoDB db = new arangojs.Database({ url: `http://${host}:${port}`, databaseName: databasename, precaptureStackTraces: true, }); db.useBasicAuth(username, password); const pokemons = db.collection("testCollection"); async function main() { try { const pokemons = await db.query(aql` FOR pokemon IN ${pokemons} FILTER pokemon.type == "fire" RETURN pokemon `); console.log("My pokemons, let me show you them:"); for await (const pokemon of pokemons) { console.log(pokemon.name); } } catch (err) { console.error(err.message); } } main();
Outputs error: Cannot access 'pokemons' before initialization
Cannot access 'pokemons' before initialization
The text was updated successfully, but these errors were encountered:
Oops, thanks for catching this. There are two variables with the same name. I'll fix the documentation.
Sorry, something went wrong.
bd2bc20
pluma
No branches or pull requests
Outputs error:
Cannot access 'pokemons' before initialization
The text was updated successfully, but these errors were encountered: