opened
elhigu
username_0
# Environment

Knex version: 0.21
Database + version: mssql 
OS: Any / runkit

@smorey2.

# Bug

1. Explain what kind of behaviour you are getting and how you think it should do

//? should be written as ? in native SQL that is sent to server.

2. Error message
 None. But ? mark is replaced with mssql binding syntax.

3. Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
   database connection to MySQL or PostgreSQL, then single file example which initializes
   needed data and demonstrates the problem.

https://runkit.com/embed/xt3cgb62kfko

```
const Knex = require('knex');

const knexMssql = Knex({
  client: 'mssql'
});

const knexPg = Knex({
  client: 'pg'
});

// using knex.select() to wrap .raw to get an access to .toNative() method (knex.raw().toSQL().toNative() doesn't exists)
console.log(
knexMssql.select(knexMssql.raw('mssql insert ?')).toSQL().toNative(),
knexMssql.select(knexMssql.raw('mssql insert ?', ['?'])).toSQL().toNative(),
knexMssql.select(knexMssql.raw('mssql insert \\?')).toSQL().toNative(),
knexMssql.select(knexMssql.raw('mssql insert \\\\?')).toSQL().toNative(),
knexPg.select(knexPg.raw('pg insert ?')).toSQL().toNative(),
knexPg.select(knexPg.raw('pg insert ?', ['?'])).toSQL().toNative(),
knexPg.select(knexPg.raw('pg insert \\?')).toSQL().toNative(),
knexPg.select(knexPg.raw('pg insert \\\\?')).toSQL().toNative()
)
```

```
Outputs:

Object {bindings: [], sql: "select mssql insert @p0"}
Object {bindings: ["?"], sql: "select mssql insert @p0"}
Object {bindings: [], sql: "select mssql insert \\@p0"}
Object {bindings: [], sql: "select mssql insert \\\\@p0"}
Object {bindings: [], sql: "select pg insert $1"}
Object {bindings: ["?"], sql: "select pg insert $1"}
Object {bindings: [], sql: "select pg insert ?"}
Object {bindings: [], sql: "select pg insert $1"}
```
Mssql \\? question mark escaping doesn't work on mssql
issue
created
sigmama
username_1
same issue encounted with mssql
comment
created
kibertoad
username_2
@username_0 Is it the same as #4053?
comment
created
elhigu
username_0
Yep. That runkit also works with latest knex now https://runkit.com/embed/kzxpan3w8594 though \\\\? with postgres does something weird...
comment
closed
elhigu
username_0
issue