querybuilder icon indicating copy to clipboard operation
querybuilder copied to clipboard

Wrong binding OrderByRaw with type of array

Open kenzouno1 opened this issue 1 year ago • 2 comments

I'm try this query with playground. Array variable only get first index and variables after it use value of array.

Query

using SqlKata.Extensions;

var test1 = "test1";
var test2 = "test2";
var test3 = new int[]{1,2,3};

var query = new Query("Test")
.Select("test")
.OrderByRaw("Id = ? and test3 in (?) and test2=?",test1,test3,test2)
.Select("Id", "Name", "Url");

Result

SELECT * FROM "Test" ORDER BY Id = 'test1' and test3 in (1) and test2=2

kenzouno1 avatar Nov 09 '22 01:11 kenzouno1