Database

Database

Operations

What can you do with the database?

Your database in Busywork looks like a spreadsheet, but under the hood you get a powerful database with a lot of useful features built on top.

Read & Write

This is might be obvious, but the database supports read and write operations. It allows you to query the database for specific data and to write to the database. None of the operations require you to know query languages or code. You can build queries visually inside Functions.

Add a task to the database
Add a task to the database

You can see how new data are inserted into the database. This case shows how you can add a new task to the database, making a todo app. The description is inferred from the request passed from the frontend, which could be the value of a form input.

image

In the same way you can find tasks in the tasks database, returning the first 100 tasks in this case. You can easily add conditions to the find block, so it only returns the tasks that you're interested in displaying.

Filtering results in the Find block
Filtering results in the Find block

Remove

Update

File Storage

Data Types

Currently the database supports a full-set of primitive data types and a set of complex data types. See which data types that are supported by the database below.

Primitive Types

  • Text
  • Number
  • Integer
  • Floating-point number
  • Boolean
  • Date

Complex Types

  • Array
  • Objects (JSON)
  • Files

Field Rules

Field rules allow you to set up validation for individual fields, visually, from within Busywork. Currently, Busywork supports general field rules and data type-specific rules.

Required & Unique options
Required & Unique options

The general field rules are,

  • Required
  • Unique

Required means that an insert operation will fail if the field is marked as required but a value isn't passed to the block.

Unique requires the value of the field to be unique within the collection. If an insert operation tries to add a record that doesn't comply with the unique rule, the operation will fail.

Data Type Rules

Busywork allows you to set up validation rules for text and number types. You can apply one or more rules to a field.

image

At the moment you can apply the following rules.

Text Rules

  • Maximum Length
  • Minimum Length
  • Equal To
  • Not Equal To

Number Rules

  • Equal To
  • Not Equal To
  • Greater Than
  • Greater or Equal
  • Less Than
  • Less or Equal

Continue Reading

🖥️
Spreadsheet-like Interface
🛑
Roles & Permissions