File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,34 +66,35 @@ export class Sql {
6666 }
6767 }
6868
69- get text ( ) {
69+ get sql ( ) {
7070 const len = this . strings . length ;
7171 let i = 1 ;
7272 let value = this . strings [ 0 ] ;
73- while ( i < len ) value += `$ ${ i } ${ this . strings [ i ++ ] } ` ;
73+ while ( i < len ) value += `? ${ this . strings [ i ++ ] } ` ;
7474 return value ;
7575 }
7676
77- get sql ( ) {
77+ get statement ( ) {
7878 const len = this . strings . length ;
7979 let i = 1 ;
8080 let value = this . strings [ 0 ] ;
81- while ( i < len ) value += `? ${ this . strings [ i ++ ] } ` ;
81+ while ( i < len ) value += `: ${ i } ${ this . strings [ i ++ ] } ` ;
8282 return value ;
8383 }
8484
85- get statement ( ) {
85+ get text ( ) {
8686 const len = this . strings . length ;
8787 let i = 1 ;
8888 let value = this . strings [ 0 ] ;
89- while ( i < len ) value += `: ${ i } ${ this . strings [ i ++ ] } ` ;
89+ while ( i < len ) value += `$ ${ i } ${ this . strings [ i ++ ] } ` ;
9090 return value ;
9191 }
9292
9393 inspect ( ) {
9494 return {
95- text : this . text ,
9695 sql : this . sql ,
96+ statement : this . statement ,
97+ text : this . text ,
9798 values : this . values ,
9899 } ;
99100 }
You can’t perform that action at this time.
0 commit comments