im adding plugable model which will be responsible managing query_result.data (big python object). my goal is adding db and file models and making it flexible to add new models later on like S3
my WIP implementation is here please feel free to commit to the branch or share your toughs on this
- by default it is using ‘db’ and code going to be backward compatible
- QueryResultData is used only when its necessary, rest of QueryResult operations are done without ‘data’ (large python object)
- since query_result_data rows are much smaller now any query hitting this table going to be efficient. since it dont need to read “data” field from disk.
- QueryResultData using QueryResult.id as a key value of result object. in case of ‘db’ its PK
- QueryResultData only used from QueryResult so this way we get minimum refactoring impact.
- QueryResultData is only responsible storing, retrieving or deleting data object. it is independent of the type of ‘data’ object. next step could be converting object type to more compact one.