diff --git a/modules/tools/assets/images/udf-add-function-inline.png b/modules/tools/assets/images/udf-add-function-inline.png deleted file mode 100644 index 10c35c8b1c..0000000000 Binary files a/modules/tools/assets/images/udf-add-function-inline.png and /dev/null differ diff --git a/modules/tools/assets/images/udf-add-function-js.png b/modules/tools/assets/images/udf-add-function-js.png deleted file mode 100644 index 095199cc57..0000000000 Binary files a/modules/tools/assets/images/udf-add-function-js.png and /dev/null differ diff --git a/modules/tools/assets/images/udf-add-library.png b/modules/tools/assets/images/udf-add-library.png deleted file mode 100644 index 6d506c39e9..0000000000 Binary files a/modules/tools/assets/images/udf-add-library.png and /dev/null differ diff --git a/modules/tools/assets/images/udf-screen-with-library.png b/modules/tools/assets/images/udf-screen-with-library.png deleted file mode 100644 index 9a5084c917..0000000000 Binary files a/modules/tools/assets/images/udf-screen-with-library.png and /dev/null differ diff --git a/modules/tools/assets/images/udf-screen.png b/modules/tools/assets/images/udf-screen.png deleted file mode 100644 index 8eb5a5cde6..0000000000 Binary files a/modules/tools/assets/images/udf-screen.png and /dev/null differ diff --git a/modules/tools/pages/udfs-ui.adoc b/modules/tools/pages/udfs-ui.adoc deleted file mode 100644 index 756f354440..0000000000 --- a/modules/tools/pages/udfs-ui.adoc +++ /dev/null @@ -1,78 +0,0 @@ -= User-Defined Functions UI -:imagesdir: ../assets/images -:description: The Couchbase Server admin console provides a UI for adding user defined functions. - -[abstract] -{description} - -Couchbase Administration console provides an interface to create, update, or delete user-defined functions written in {sqlpp} or JavaScript. - -Start at the administration console and select menu:Query[UDF] from the menus to access the *UDF* screen. - -image::udf-screen.png[alt="screen for adding user-defined functions"] - -If you have created any external libraries to store external function code, these are listed in the *JavaScript Function Libraries* section. - -If you have created any inline or external user-defined functions, these are listed in the *User-Defined Functions* section. -This includes {sqlpp} managed user-defined functions -- that is, JavaScript functions which are not stored in a library. - -== JavaScript Function Libraries - -Click on the `{plus}{nbsp}add function library` link to create a library of JavaScript functions. - -image::udf-add-library.png[,500, alt="add javascript library screen"] - -When you create a new library, an example function (`add`) is supplied as an example. -You can delete it when you add your own function, or leave it to serve as a basic example. - -You can set a *Namespace* for your library which will restrict its access to users that have permissions to access the bucket and scope specified by the namespace. - -Before you leave the screen, you must set a *Library Name*. - -Click btn:[Save] to save the library and return to the main UDF screen, or btn:[Cancel] to cancel without saving the library. - -image::udf-screen-with-library.png[alt="udf screen with library added"] - -You can *edit* the library again to add and/or delete functions contained inside it. - -You can also delete the whole library by clicking on the *drop* link. - -== User-Defined Functions - -You can add your own user-defined functions in the lower *User-Defined Functions* list. -These functions can be one of two types: - -[horizontal] -*Inline*:: This is a function written in {sqlpp} which can be used as part of another {sqlpp} statement, such as xref:n1ql:n1ql-language-reference/selectintro.adoc[SELECT] and xref:n1ql:n1ql-language-reference/execfunction.adoc[EXECUTE FUNCTION]. - -*JavaScript*:: You can create {sqlpp} functions that call the JavaScript functions defined in your library. - -To add a user-defined function, click on *{plus}{nbsp}add function* below the *User-Defined Functions* list. - -image::udf-add-function-inline.png[,500, alt="Add function screen"] - -The *Namespace* can be set to define the scope that function resides in (`travel-sample.inventory` for example). - -Users will need permissions to access this namespace to run the function. - -The *Function Name* is the name that will be used in {sqlpp} statements (`EXECUTE FUNCTION` for example) to reference your function. -The name must be unique and is case-insensitive. - -You can define a list of fixed parameters for your function, or you can use the `...` symbol which indicates a variable length function list defined as `args[]`. - -The *Function Type* can be either `inline` or `javascript`. - -If you are defining an `inline` function then you can fill in any valid {sqlpp} expression which can then be used as part of another {sqlpp} statement. -This is the default when creating a function. - -If you switch *Function Type* to `javascript` then the dialog will change to configure a JavaScript function call. - -image::udf-add-function-js.png[,500, alt="add JavaScript function"] - -Then you select the JavaScript Library where you created your JavaScript function, and the name of your function. -(There is no need to include the parameters.) - -Once the details have been filled, you can click the btn:[Save Function] to save the function and exit the dialog, or click on btn:[Cancel] to exit the dialog without saving the details. - -NOTE: You cannot use the UDF console to create {sqlpp} managed user-defined functions -- that is, JavaScript functions which are not stored in a library. -To do this, see xref:n1ql:n1ql-language-reference/createfunction.adoc[].