Skip to content

Commit df985e1

Browse files
committed
Function names must be unique
1 parent 166fe71 commit df985e1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

modules/n1ql/pages/n1ql-language-reference/createfunction.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ include::partial$grammar/ddl.ebnf[tag=function]
153153
image::n1ql-language-reference/function.png["Syntax diagram: see source code listing", align=left]
154154

155155
The function name specifies the name of the function to create.
156-
It is recommended to use an unqualified identifier for the function name, such as `func1` or `{backtick}func-1{backtick}`.
156+
It's recommended to use an unqualified identifier for the function name, such as `func1` or `{backtick}func-1{backtick}`.
157157
In this case, the function is created as a global function or a scoped function, depending on the current query context.
158158

159159
To create a global function in a particular namespace, the function name must be a qualified identifier with a namespace, such as `default:func1`.
@@ -162,6 +162,10 @@ Similarly, to create a scoped function in a particular scope, the function name
162162
If the function name is an unqualified identifier, it may not be the same as a reserved keyword.
163163
A function name with a specified namespace or scope may have the same name as a reserved keyword.
164164

165+
The function name must be unique within its scope or namespace.
166+
You cannot have two functions with the same name inside the same scope or namespace.
167+
You can have two functions with the same name across different scopes or namespaces.
168+
165169
[id='{section}-parameter']
166170
==== Function Parameters
167171

0 commit comments

Comments
 (0)