AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Flutter sqlite command line database9/27/2023 ![]() This is used by build_runner to generate the code to use the database.īuild_runner is primarily used to generate code for your Flutter projects.īefore I came to Flutter, I rarely, if ever, had to use a code generation utility. In order to use Moor, we import the Moor package from flutter pub, but we also have to import something called the moor_generator. In this article we’ll look at Moor, but the approach that these two packages take in abstracting SQLite is fairly similar. ![]() These abstractions can make a SQLite database easier to use, while still retaining a lot of the benefits of SQLite.įloor and Moor are fairly popular examples of this approach. ![]() That’s why there are so many solutions that abstract some of the functionality from SQLite into more easily used functionality. □ĭirectly using SQLite to manage your application database can be quite powerful but also unwieldy. This would be incredibly fast but would open you up to some weird bugs if you weren’t a programming genius. You can store your data in a JSON file and handle the serialisation and deserialisation yourself. Individually tailored data storage - while this option is not technically a database, you don’t have to use the above solutions. MongoDB is an example of a NoSQL database. They are lightning-quick and handle huge unstructured pieces of data very well. A schema is not enforced as is the case with a relational database. NoSQL - these databases store data as documents. SQLite is an example of a relational database. They don’t just store data but also the relationships between the data. Relational - these are the databases in the traditional sense. They typically fit into these three categories: There are a lot of options out there today when it comes to databases in your application. But which is the best database for Flutter? Lewis Cianci checks it out. No matter who you are or what you do, sooner or later you’re going to need to store data in your app and then retrieve it later.
0 Comments
Read More
Leave a Reply. |