Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-313

permit using question mark parameters even when using namedPlaceholders option

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.4.1
    • compatibility
    • None

    Description

      see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/306

      for mysql2 compatibility, permits the use of question mark parameters even when setting `namedPlaceholders` option.

      example :

          await conn.query('CREATE TABLE namedPlaceholders1(t varchar(128))');
          await conn.query("INSERT INTO `namedPlaceholders1` value ('a'), ('b'), ('c')");
          
          // permit use of placeholder
          let res = await conn.query('select * from `namedPlaceholders1` where t IN (:possible)', { possible: ['a', 'c'] });
          
          // but standard question mark queries still works
          res = await conn.query('select * from `namedPlaceholders1` where t IN (?)', [['b', 'c']]);
      

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.