immutable chrome sqlite return objects

后端 未结 2 451
青春惊慌失措
青春惊慌失措 2021-02-08 10:36

I am using a sqlite DB as a storage system for a webapp. I been using the objects that are returned from queries directly in application. For example:

function g         


        
2条回答
  •  旧巷少年郎
    2021-02-08 11:17

    The WebSQL spec doesn't require for the returned item to be sealed, but it's up to the implementation (the spec does require for the item to be an ordered dictionary with the properties in the same order as the columns in your query).

    And no, there is no way to explicitly request a mutable object, so you'll want to do something like the convert_to_mutable() approach suggested by Stan.

    BTW, assuming you're using a 3rd party library, it probably has a function for this, for example jQuery.extend() or _.extend().

提交回复
热议问题