Functions
/
Introduction to Functions
Getting Started
Tutorials
Datasources
Functions
Spaces
Queues
Components
Self Hosted
Settings
REST API

Introduction to Functions

A function specifies the underlying action that a component can perform, such as reading data, inserting a record, updating multiple records or calling an API. When you add components to a Space, you'll be able to select the function that you want that component to perform. For example, you may want a button component to edit a User record using the Update Users function, or a form component to create a new record using the Insert User function.

Auto-generated functions

When you connect a data source, Internal will automatically generate functions based on that data source. For most data sources these functions will be "insert", "update", and "delete". See the documentation for each data source to view what functions are automatically generated. Note that in order for Internal to generate these functions, the user account (credentials) that Internal uses to connect to the data source must have permissions to insert, update and delete data -- otherwise these functions will not be generated.

Creating functions with the function editor

You can also create your own functions using the Function Editor. Learn more below:

SQL Database Functions (PostgreSQL, MySQL, SQL Server, MariaDB, Cassandra)

MongoDB Functions

HTTP Functions (REST APIs, GraphQL, SOAP APIs, or any other HTTP request)

Why are some of my functions missing?

Sometimes auto-generated functions don't get created. Specifically: UPDATE and INSERT functions. The primary reasons for this are enumerated below:

  1. The user credentials used during the addition of the Data Source did not have "write permissions" for the table(s) for which the functions were being generated. This can be easily corrected by changing the user's permissions in your DB instance, or by adding the data source again with a user that has the correct permissions.
  2. The table(s) in question lacks a "primary key." This is also fairly easy to address by adding a primary key to the table(s). Often times, the primary key is a user-id or an email address. Each DB type has differing ways of assigning primary keys, so it is best to defer to the documentation for your DB instance for how to do so.

In both cases, please be sure to re-sync you data source in the company settings menu.