SQLite: Select Random Records from a Table

September 12, 2021 A Goodman

In SQLite, you can randomly get one or multiple rows from a table by using the following select statement: Example Let’s say we have a table named users: Column Data Type id INTEGER email TEXT name…

MongoDB: Get a Random Document from a Collection

September 12, 2021 Guest Contributor

This short and straight-to-the-point post shows you how to randomly retrieve single or multiple documents from a collection in your MongoDB database by using the $sample aggregation. 1. To get a random document: If you want…

MongoDB: Import/Export a Database with Command Line

September 12, 2021 A Goodman

If you’re using MongoDB, you can export or import a whole database by using a single command line. All of the collections of that database will be exported/imported at once. It’s super convenient when backup/restore data….

4 Ways to Store Data Offline in Flutter

February 24, 2021 A Goodman

There are many cases where you need to store data locally on users’ devices instead of using remote cloud servers or APIs, for example, you may need to persist data across app launches, or download a…

How to see your MySQL version in macOS

June 20, 2020 A Goodman

In order to check you MySQL version in macOS, just open the terminal and perform the following command: You’ll see something similar to this: Simple as that 🙂