common_function/scalars/
string.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! String scalar functions
16
17mod elt;
18mod field;
19mod format;
20mod insert;
21mod locate;
22mod regexp_extract;
23mod space;
24
25pub(crate) use elt::EltFunction;
26pub(crate) use field::FieldFunction;
27pub(crate) use format::FormatFunction;
28pub(crate) use insert::InsertFunction;
29pub(crate) use locate::LocateFunction;
30pub(crate) use regexp_extract::RegexpExtractFunction;
31pub(crate) use space::SpaceFunction;
32
33use crate::function_registry::FunctionRegistry;
34
35/// Register all string functions
36pub fn register_string_functions(registry: &FunctionRegistry) {
37    EltFunction::register(registry);
38    FieldFunction::register(registry);
39    FormatFunction::register(registry);
40    InsertFunction::register(registry);
41    LocateFunction::register(registry);
42    RegexpExtractFunction::register(registry);
43    SpaceFunction::register(registry);
44}