liveBook · Manning

User-defined function

A user-defined function is a programmer-authored function that performs custom computation when invoked by an application, query, or data-processing system.

How 2 Manning books explain it

Server-Side WebAssembly

A user-defined function is a database function implemented by an application or extension rather than built into the database engine.

How it is used
Extends database capabilities with custom logic that executes beside the stored data.
How deep it goes
Explains locality, language flexibility, sandboxing, binary embedding, and SQL registration, but does not detail function implementation code.
Examples
Uses libSQL encryption and decryption functions registered from embedded Wasm binaries.
What you can do after
Operate/configure libSQL UDFs by building Wasm, generating a hex dump, and issuing CREATE FUNCTION statements.

Read how Server-Side WebAssembly explains user-defined function →

Statistics Slam Dunk

A user-defined function is a named, programmer-authored block of code that accepts inputs and returns a result or performs an operation.

How it is used
Creates reusable R calculations for repeated analytical tasks such as correlation conversion and Gini estimation.
How deep it goes
Defines names, arguments, bodies, return values, calls, and missing-argument behavior through short worked examples.
Examples
Uses correlation conversions, Gini estimation, Lorenz-curve values, returned results, and a missing-argument error.
What you can do after
Build it from scratch in R by defining functions, passing arguments, returning values, and reusing calculations.

Read how Statistics Slam Dunk explains user-defined function →

Also covered in

What to know first

Related concepts

Questions about user-defined function

What is user-defined function?

A user-defined function is a programmer-authored function that performs custom computation when invoked by an application, query, or data-processing system.

Which Manning books explain user-defined function?

Server-Side WebAssembly and Statistics Slam Dunk.

What should I know before learning user-defined function?

Manning books that teach user-defined function usually introduce SQL first.

What is the difference between user-defined function and stored procedure?

A user-defined function is a programmer-authored function that performs custom computation when invoked by an application, query, or data-processing system. A stored procedure is a named executable routine stored in a database and run by its database management system to perform operations.

What is user-defined function a kind of?

User-defined function is a kind of database function. A database function is a named routine stored or executed in a database that accepts inputs and computes a result, often a scalar or table-valued result.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.