File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1373,6 +1373,22 @@ module(basename(__filename), function () {
13731373 'instance' ,
13741374 'instance is repaired when missing module is added' ,
13751375 ) ;
1376+ let rows = ( await testDbAdapter . execute (
1377+ `SELECT error_doc IS NULL AS is_sql_null
1378+ FROM boxel_index
1379+ WHERE realm_url = '${ testRealm } '
1380+ AND (
1381+ url = '${ testRealm } deep-card.json'
1382+ OR file_alias = '${ testRealm } deep-card'
1383+ )
1384+ AND type = 'instance'` ,
1385+ ) ) as { is_sql_null : boolean } [ ] ;
1386+ assert . strictEqual (
1387+ rows . length ,
1388+ 1 ,
1389+ 'index row exists for deep-card instance' ,
1390+ ) ;
1391+ assert . true ( rows [ 0 ] . is_sql_null , 'error_doc is SQL NULL after recovery' ) ;
13761392 } ) ;
13771393
13781394 test ( 'can incrementally index deleted instance' , async function ( assert ) {
Original file line number Diff line number Diff line change @@ -277,14 +277,12 @@ export function asExpressions(
277277 valueExpressions : Param [ ] [ ] ;
278278} {
279279 let paramBucket = Object . fromEntries (
280- Object . entries ( values ) . map ( ( [ col , val ] ) => [
281- col ,
282- param (
283- opts ?. jsonFields ?. includes ( col )
284- ? stringify ( val ?? null )
285- : ( val ?? null ) ,
286- ) ,
287- ] ) ,
280+ Object . entries ( values ) . map ( ( [ col , val ] ) => {
281+ if ( opts ?. jsonFields ?. includes ( col ) ) {
282+ return [ col , param ( val == null ? null : ( stringify ( val ) ?? null ) ) ] ;
283+ }
284+ return [ col , param ( val ?? null ) ] ;
285+ } ) ,
288286 ) ;
289287 let nameExpressions = Object . keys ( paramBucket ) . map ( ( name ) => [ name ] ) ;
290288 let valueExpressions = Object . keys ( paramBucket ) . map ( ( k ) => {
You can’t perform that action at this time.
0 commit comments