A function is a module of organized, reusable code that completes a specific action. Functions are used widely in computer programming because they are modular and reusable, and provide an output when given an input. Kidscodecs says a function is like a trusty dog that does the exact same trick (output) every time it is asked (input), which is adorable. 🐶
In Internal, a function specifies the underlying action that a component can perform. When components are added to a Space, whatever function is selected for that component will determine the action it performs. For instance, a button’s function can be wired to edit a user record or create a new user record.
The University of Utah states four main reasons functions are ubiquitous in programming, which are as follows:
Databases often provide their own set of functions to interact with the data:
A user function runs for a specific user of the application, and a system function has full access to MongoDB CRUD, aggregation APIs, and runs as the system user.
SQL Server has many built-in functions including string functions, math functions, date functions, and advanced functions.
SQL Server functions are statements that execute a specific task, and are mostly used for saving time, rather than manually performing tasks within the database. There are a lot of them, and we won’t cover them all, but here’s a list of the most common functions used in SQL Server: W3 Schools SQL Server Functions List
MySQL is like SQL Server’s opensource cousin. Much of it remains the same, including functions, although queries are formatted differently.
Same with SQL Server, there are many functions built into MySQL, and we certainly won’t cover them all. Fortunately, W3 Schools has already done that!
PostgreSQL is an open source database released under the PostgreSQL License. All uses of PostgreSQL are free, including commercial use. Like MySQL and SQL Server, databases are communicated with via queries.
PostgreSQL also provides numerous functions for interacting with data via query.
Internal allows users to create functions that integrate and interact with any data source. Some functions, including insert, update, and delete, are automatically generated the second a user connects a data source.
Furthermore, Internal offers a function editor that can be used on top of any data source to write custom functions that perform user-specified commands. Functions can be mapped to components, which are drag-and-droppable dynamic elements that comprise a Space.
Learn more about functions—and how to configure them for each data source—in our documentation.