My Database

My Database | Boco Apps

Tutorial

This How-To provides a step-by-step guide to using all features of My Database on your smartphone. The app opens on the Databases screen by default (or loads the default database/table if configured). Navigation is intuitive, using buttons, long-press gestures for options, and dialogs for inputs.

Note: The app requests permissions for storage, photos, and camera as needed—grant them for full functionality. If denied, enable them in your phone's settings. For Android 11+, enable "All files access" in the app's settings for imports/exports. Heavy tasks like exports/imports run in background isolates to display progress and prevent UI freezes.

Getting Started and Settings

Managing Databases

The main screen lists all databases (.db files) in alphabetical order (saved via shared_preferences), with icons. Tap a database to open its Tables screen (prompts for password if encrypted).

Creating a Database

  1. Tap the floating "+" button at the bottom-right.
  2. Select "Create Database".
  3. Enter a name (e.g., "MyNotes") in the dialog and tap "Create". This creates an empty .db file.

Importing a Database

  1. Tap "+" and choose "Import ZIP (Database + Images)", "Import SQLite DB", or "Import from CSV".
  2. Grant storage permissions if prompted.
    • ZIP Import: Select a .zip file; it extracts the .db and images to the app's documents directory, with a progress dialog.
    • SQLite Import: Select a .db/.sqlite/.sqlite3 file; copies it and adds 'image_paths' if missing.
    • CSV Import: Select a .csv file; creates a new database/table with columns from headers (sanitized names), imports rows in batches with a progress dialog.
  3. Imports process in a background isolate (showing % progress) and refresh the list.

Database Options (Long-Press a Database Name)

Managing Tables (Inside a Database)

From the Databases screen, tap a database to view its tables list (queried via sqlite_master, excluding system tables).

Creating a Table

  1. Tap the floating "+" button.
  2. Enter a table name (e.g., "Entries", sanitized to letters/numbers/underscores) and optional columns (comma-separated, e.g., "title,description"). The 'image_paths' (TEXT) column is auto-added for image support.
  3. Tap "Create".

Table Options (Long-Press a Table Name)

Managing Posts (Records in a Table)

The Posts screen displays paginated entries (100 per load, infinite scroll via ScrollController). Each post is a card with fields (via PRAGMA) and thumbnails. Long-press a card to toggle edit/delete buttons. Tap a card to open the detailed view.

Adding a Post

  1. Tap the floating "+" button.
  2. Fill text fields for each column.
  3. If images are supported: Tap "+Gallery" or "+Camera" (grants permissions, rotates via EXIF, compresses via flutter_image_compress based on quality setting, creates thumbnail). Reorder/delete thumbnails in the dialog.
  4. Tap "Add" to insert (JSON-encodes image_paths).

Editing a Post

  1. Long-press card > "Edit" (or in detailed view).
  2. Update fields/images.
  3. Tap "Update" (uses rowid or PK for WHERE).

Deleting a Post

  1. Long-press card > "Delete" (red) > Confirm.

Adding Images to a Post

Viewing Images

Detailed Post View (Single Post Screen)

Searching and Filtering Posts

Simple Search

Showing All Posts

Advanced Search (Tune Icon)

Exporting Search Results

Count Display

Additional Tips

My Database | Boco Apps