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)
3939 ctx . Bindings . Add ( offset + 1 ) ;
4040 ctx . Bindings . Add ( limit + offset ) ;
4141
42- return "ROWS ? TO ? " ;
42+ return $ "ROWS { parameterPlaceholder } TO { parameterPlaceholder } ";
4343 }
4444
4545 return null ;
@@ -59,15 +59,15 @@ protected override string CompileColumns(SqlResult ctx)
5959
6060 ctx . Query . ClearComponent ( "limit" ) ;
6161
62- return "SELECT FIRST ? " + compiled . Substring ( 6 ) ;
62+ return $ "SELECT FIRST { parameterPlaceholder } " + compiled . Substring ( 6 ) ;
6363 }
6464 else if ( limit == 0 && offset > 0 )
6565 {
6666 ctx . Bindings . Insert ( 0 , offset ) ;
6767
6868 ctx . Query . ClearComponent ( "offset" ) ;
6969
70- return "SELECT SKIP ? " + compiled . Substring ( 6 ) ;
70+ return $ "SELECT SKIP { parameterPlaceholder } " + compiled . Substring ( 6 ) ;
7171 }
7272
7373 return compiled ;
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ namespace SqlKata.Compilers
77 public class SqliteCompiler : Compiler
88 {
99 public override string EngineCode { get ; } = EngineCodes . Sqlite ;
10- protected override string parameterPlaceholder { get ; set ; } = "?" ;
11- protected override string parameterPrefix { get ; set ; } = "@p" ;
1210 protected override string OpeningIdentifier { get ; set ; } = "\" " ;
1311 protected override string ClosingIdentifier { get ; set ; } = "\" " ;
1412 protected override string LastId { get ; set ; } = "select last_insert_rowid() as id" ;
@@ -31,7 +29,7 @@ public override string CompileLimit(SqlResult ctx)
3129 if ( limit == 0 && offset > 0 )
3230 {
3331 ctx . Bindings . Add ( offset ) ;
34- return "LIMIT -1 OFFSET ? " ;
32+ return $ "LIMIT -1 OFFSET { parameterPlaceholder } ";
3533 }
3634
3735 return base . CompileLimit ( ctx ) ;
You can’t perform that action at this time.
0 commit comments