isar-community / isar

Extremely fast, easy to use, and fully async NoSQL database for Flutter
https://isar-community.dev
Apache License 2.0
126 stars 14 forks source link

Add a code migration guide from v3 to v4 #51

Open CaptainDario opened 4 months ago

CaptainDario commented 4 months ago

Thank you again for this great effort! I am trying to migrate from v3 to v4 but I am having quite some problems. As I could not find a migration guide I am asking here.

How are Indexes handled now? In the changelog it only states,

Indexes have been simplified

Which does not really help me understand how I can migrate my old code.

For example, index types seem to not be supported anymore. This leads me to the question of how I would migrate code like this @Index(type: IndexType.value). Also, case sensitivity seems to not be provided anymore like in @Index(type: IndexType.value, caseSensitive: false).

It would also help me immensely if you could explain to me how to migrate where clauses. Because this statement

Where clauses have been removed in favor of automatic index handling

tells me there are none but I used them a lot to fine-tune the performance of my application. This is crucial as I am searching a text database with more than 300.000 entries.

Maybe we could put a migration guide together?

CaptainDario commented 4 months ago

To be clear, I am not asking for automatic migration of an existing database. I would like a guide to migrate my v3 code to v4.

MrCsabaToth commented 3 months ago

I checked and thankfully I only use @Index() without typing. But there are no where clauses? I cannot comprehend that. How do you supposed to where then?