0

I'm doing a Node-SQLite exercise. Here's some of the code:

const findDogByFur = (length, color) => {
  db.all(
    "SELECT * FROM Dog WHERE fur_length = $furLength AND fur_color = $furColor", 
    {
      $furLength: length,
      $furColor: color
    }, 
    (error, rows) => {
      printQueryResults(rows);
    }
  );
});

Where in SQLite.org is the documentation for methods such as all? Why do some variables have $ in front of them without curly brackets?

eric_heim
  • 31
  • 1
  • 6
  • hi, named parameters can be prefixed with :name, @name, and $name - so it's up to you which you prefer. – jspcal May 06 '21 at 17:58
  • It's documented [here](https://github.com/mapbox/node-sqlite3/wiki/API#databaserunsql-param--callback) – Barmar May 06 '21 at 18:11

0 Answers0