Support queryWithFactory in ShadowSQLiteDatabase