File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public override string CompileLimit(SqlResult ctx)
39
39
ctx . Bindings . Add ( offset + 1 ) ;
40
40
ctx . Bindings . Add ( limit + offset ) ;
41
41
42
- return "ROWS ? TO ? " ;
42
+ return $ "ROWS { parameterPlaceholder } TO { parameterPlaceholder } ";
43
43
}
44
44
45
45
return null ;
@@ -59,15 +59,15 @@ protected override string CompileColumns(SqlResult ctx)
59
59
60
60
ctx . Query . ClearComponent ( "limit" ) ;
61
61
62
- return "SELECT FIRST ? " + compiled . Substring ( 6 ) ;
62
+ return $ "SELECT FIRST { parameterPlaceholder } " + compiled . Substring ( 6 ) ;
63
63
}
64
64
else if ( limit == 0 && offset > 0 )
65
65
{
66
66
ctx . Bindings . Insert ( 0 , offset ) ;
67
67
68
68
ctx . Query . ClearComponent ( "offset" ) ;
69
69
70
- return "SELECT SKIP ? " + compiled . Substring ( 6 ) ;
70
+ return $ "SELECT SKIP { parameterPlaceholder } " + compiled . Substring ( 6 ) ;
71
71
}
72
72
73
73
return compiled ;
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ namespace SqlKata.Compilers
7
7
public class SqliteCompiler : Compiler
8
8
{
9
9
public override string EngineCode { get ; } = EngineCodes . Sqlite ;
10
- protected override string parameterPlaceholder { get ; set ; } = "?" ;
11
- protected override string parameterPrefix { get ; set ; } = "@p" ;
12
10
protected override string OpeningIdentifier { get ; set ; } = "\" " ;
13
11
protected override string ClosingIdentifier { get ; set ; } = "\" " ;
14
12
protected override string LastId { get ; set ; } = "select last_insert_rowid() as id" ;
@@ -31,7 +29,7 @@ public override string CompileLimit(SqlResult ctx)
31
29
if ( limit == 0 && offset > 0 )
32
30
{
33
31
ctx . Bindings . Add ( offset ) ;
34
- return "LIMIT -1 OFFSET ? " ;
32
+ return $ "LIMIT -1 OFFSET { parameterPlaceholder } ";
35
33
}
36
34
37
35
return base . CompileLimit ( ctx ) ;
You can’t perform that action at this time.
0 commit comments