tinybase icon indicating copy to clipboard operation
tinybase copied to clipboard

Allow null values in cells

Open yan-yanishevsky opened this issue 2 years ago • 2 comments

When creating a new row it is impossible to store null values in a cell. It will be just dropped. In my app, I need to check specifically for nulls

    store.setRow('files', 'test_id', {
      name: 'Test file',
      folder_id: null,
    })

    console.log(store.getRow('files', 'test_id')) // {name: 'Test file'}

yan-yanishevsky avatar Jul 25 '23 14:07 yan-yanishevsky

Unfortunately, null currently has a special meaning for a cell in several places (eg it means 'delete' in the transaction logs).

It would be a big breaking change but I could consider this for, say a v5.0 release.

Are you able to work around it for now?

jamesgpearce avatar Aug 11 '23 12:08 jamesgpearce

Yes, sure. Thank you

yan-yanishevsky avatar Aug 14 '23 10:08 yan-yanishevsky