(#2818) - implement for websql/idb, add tests