duckdb 0.7.2-dev2740.0 → 0.7.2-dev2867.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +21 -13
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +51 -1
- package/src/duckdb/extension/icu/icu-strptime.cpp +1 -1
- package/src/duckdb/extension/json/include/json_functions.hpp +35 -37
- package/src/duckdb/extension/json/include/json_scan.hpp +1 -1
- package/src/duckdb/extension/json/include/json_transform.hpp +1 -1
- package/src/duckdb/extension/json/json-extension.cpp +10 -20
- package/src/duckdb/extension/json/json_functions/copy_json.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_array_length.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_contains.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_create.cpp +20 -20
- package/src/duckdb/extension/json/json_functions/json_extract.cpp +4 -6
- package/src/duckdb/extension/json/json_functions/json_keys.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +8 -8
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +4 -4
- package/src/duckdb/extension/json/json_functions/json_type.cpp +2 -3
- package/src/duckdb/extension/json/json_functions/json_valid.cpp +2 -2
- package/src/duckdb/extension/json/json_functions/read_json.cpp +6 -6
- package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +4 -4
- package/src/duckdb/extension/json/json_functions.cpp +6 -6
- package/src/duckdb/extension/parquet/parquet-extension.cpp +16 -28
- package/src/duckdb/src/catalog/catalog_entry/pragma_function_catalog_entry.cpp +1 -2
- package/src/duckdb/src/catalog/catalog_entry/scalar_function_catalog_entry.cpp +1 -1
- package/src/duckdb/src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp +2 -2
- package/src/duckdb/src/catalog/catalog_entry/table_function_catalog_entry.cpp +1 -2
- package/src/duckdb/src/catalog/catalog_transaction.cpp +4 -0
- package/src/duckdb/src/catalog/duck_catalog.cpp +8 -1
- package/src/duckdb/src/common/enums/date_part_specifier.cpp +82 -0
- package/src/duckdb/src/common/local_file_system.cpp +1 -3
- package/src/duckdb/src/common/multi_file_reader.cpp +11 -8
- package/src/duckdb/src/common/types/vector.cpp +136 -3
- package/src/duckdb/src/{function → core_functions}/aggregate/algebraic/avg.cpp +9 -12
- package/src/duckdb/src/core_functions/aggregate/algebraic/corr.cpp +13 -0
- package/src/duckdb/src/core_functions/aggregate/algebraic/covar.cpp +21 -0
- package/src/duckdb/src/core_functions/aggregate/algebraic/stddev.cpp +34 -0
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/approx_count.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/arg_min_max.cpp +7 -23
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bitagg.cpp +10 -10
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bitstring_agg.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/bool.cpp +1 -17
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/entropy.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/kurtosis.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/minmax.cpp +5 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/product.cpp +2 -11
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/skew.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/string_agg.cpp +4 -6
- package/src/duckdb/src/{function → core_functions}/aggregate/distributive/sum.cpp +38 -46
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/approximate_quantile.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/mode.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/quantile.cpp +31 -23
- package/src/duckdb/src/{function → core_functions}/aggregate/holistic/reservoir_quantile.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/aggregate/nested/histogram.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/nested/list.cpp +6 -10
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_avg.cpp +7 -11
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_count.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_intercept.cpp +5 -8
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_r2.cpp +5 -7
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_slope.cpp +5 -7
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_sxx_syy.cpp +8 -12
- package/src/duckdb/src/{function → core_functions}/aggregate/regression/regr_sxy.cpp +6 -8
- package/src/duckdb/src/core_functions/core_functions.cpp +50 -0
- package/src/duckdb/src/core_functions/function_list.cpp +352 -0
- package/src/duckdb/src/{function → core_functions}/scalar/bit/bitstring.cpp +12 -15
- package/src/duckdb/src/{function → core_functions}/scalar/blob/base64.cpp +6 -6
- package/src/duckdb/src/{function → core_functions}/scalar/blob/encode.cpp +7 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/age.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/date/current.cpp +8 -8
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_diff.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_part.cpp +144 -148
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_sub.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/date_trunc.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/date/epoch.cpp +7 -8
- package/src/duckdb/src/{function → core_functions}/scalar/date/make_date.cpp +14 -14
- package/src/duckdb/src/core_functions/scalar/date/strftime.cpp +251 -0
- package/src/duckdb/src/{function → core_functions}/scalar/date/time_bucket.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/date/to_interval.cpp +39 -19
- package/src/duckdb/src/{function/scalar/enum/enum_functions_implementation.cpp → core_functions/scalar/enum/enum_functions.cpp} +18 -22
- package/src/duckdb/src/{function → core_functions}/scalar/generic/alias.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/current_setting.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/generic/error.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/hash.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/generic/least.cpp +8 -9
- package/src/duckdb/src/{function → core_functions}/scalar/generic/stats.cpp +4 -4
- package/src/duckdb/src/{function/scalar/system → core_functions/scalar/generic}/system_functions.cpp +24 -13
- package/src/duckdb/src/{function → core_functions}/scalar/generic/typeof.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/list/array_slice.cpp +3 -13
- package/src/duckdb/src/{function → core_functions}/scalar/list/flatten.cpp +5 -5
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_aggregates.cpp +2 -13
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_lambdas.cpp +9 -24
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_sort.cpp +8 -22
- package/src/duckdb/src/{function → core_functions}/scalar/list/list_value.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/list/range.cpp +8 -6
- package/src/duckdb/src/{function → core_functions}/scalar/map/cardinality.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/scalar/map/map.cpp +6 -63
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_entries.cpp +5 -4
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_extract.cpp +22 -7
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_from_entries.cpp +6 -5
- package/src/duckdb/src/{function → core_functions}/scalar/map/map_keys_values.cpp +8 -7
- package/src/duckdb/src/{function → core_functions}/scalar/math/numeric.cpp +110 -138
- package/src/duckdb/src/{function → core_functions}/scalar/operators/bitwise.cpp +19 -20
- package/src/duckdb/src/{function/scalar/math → core_functions/scalar/random}/random.cpp +5 -6
- package/src/duckdb/src/{function/scalar/math → core_functions/scalar/random}/setseed.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/string/ascii.cpp +4 -5
- package/src/duckdb/src/{function → core_functions}/scalar/string/bar.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/string/chr.cpp +5 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/damerau_levenshtein.cpp +4 -6
- package/src/duckdb/src/{function/scalar/string/mismatches.cpp → core_functions/scalar/string/hamming.cpp} +3 -12
- package/src/duckdb/src/{function → core_functions}/scalar/string/hex.cpp +15 -25
- package/src/duckdb/src/{function → core_functions}/scalar/string/instr.cpp +6 -13
- package/src/duckdb/src/{function → core_functions}/scalar/string/jaccard.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/jaro_winkler.cpp +7 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/left_right.cpp +18 -11
- package/src/duckdb/src/{function → core_functions}/scalar/string/levenshtein.cpp +3 -12
- package/src/duckdb/src/{function → core_functions}/scalar/string/md5.cpp +15 -21
- package/src/duckdb/src/{function → core_functions}/scalar/string/pad.cpp +7 -13
- package/src/duckdb/src/{function → core_functions}/scalar/string/printf.cpp +10 -10
- package/src/duckdb/src/{function → core_functions}/scalar/string/repeat.cpp +3 -6
- package/src/duckdb/src/{function → core_functions}/scalar/string/replace.cpp +4 -7
- package/src/duckdb/src/{function → core_functions}/scalar/string/reverse.cpp +3 -3
- package/src/duckdb/src/{function → core_functions}/scalar/string/starts_with.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/string/string_split.cpp +11 -11
- package/src/duckdb/src/{function → core_functions}/scalar/string/translate.cpp +4 -7
- package/src/duckdb/src/{function → core_functions}/scalar/string/trim.cpp +19 -14
- package/src/duckdb/src/core_functions/scalar/string/unicode.cpp +28 -0
- package/src/duckdb/src/{function → core_functions}/scalar/struct/struct_insert.cpp +4 -4
- package/src/duckdb/src/{function → core_functions}/scalar/struct/struct_pack.cpp +3 -4
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_extract.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_tag.cpp +4 -8
- package/src/duckdb/src/{function → core_functions}/scalar/union/union_value.cpp +4 -59
- package/src/duckdb/src/execution/operator/persistent/base_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/persistent/parallel_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +11 -2
- package/src/duckdb/src/function/aggregate/distributive_functions.cpp +0 -17
- package/src/duckdb/src/function/cast/string_cast.cpp +1 -1
- package/src/duckdb/src/function/function.cpp +0 -8
- package/src/duckdb/src/function/function_set.cpp +25 -0
- package/src/duckdb/src/function/scalar/generic_functions.cpp +1 -9
- package/src/duckdb/src/function/scalar/nested_functions.cpp +0 -22
- package/src/duckdb/src/function/scalar/operators.cpp +0 -6
- package/src/duckdb/src/function/scalar/{date/strftime.cpp → strftime_format.cpp} +1 -249
- package/src/duckdb/src/function/scalar/string/length.cpp +0 -19
- package/src/duckdb/src/function/scalar/string_functions.cpp +0 -40
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +5 -0
- package/src/duckdb/src/function/table/arrow_conversion.cpp +1 -1
- package/src/duckdb/src/function/table/read_csv.cpp +7 -4
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +27 -40
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/aggregate_function_catalog_entry.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/function_entry.hpp +33 -0
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/pragma_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/scalar_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_transaction.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/algorithm.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/multi_file_reader.hpp +5 -4
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +11 -1
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/corr.hpp +3 -4
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/covar.hpp +1 -1
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/algebraic/stddev.hpp +1 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic_functions.hpp +124 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +229 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/holistic_functions.hpp +85 -0
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/nested_functions.hpp +41 -0
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/regression/regr_count.hpp +3 -4
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/regression/regr_slope.hpp +2 -2
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression_functions.hpp +97 -0
- package/src/duckdb/src/include/duckdb/{function → core_functions}/aggregate/sum_helpers.hpp +1 -1
- package/src/duckdb/src/include/duckdb/{function/scalar/uuid_functions.hpp → core_functions/core_functions.hpp} +7 -5
- package/src/duckdb/src/include/duckdb/core_functions/function_list.hpp +33 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/bit_functions.hpp +52 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/blob_functions.hpp +58 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/date_functions.hpp +544 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/enum_functions.hpp +61 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/generic_functions.hpp +142 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +220 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/map_functions.hpp +85 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +394 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/operators_functions.hpp +70 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/random_functions.hpp +49 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +439 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/struct_functions.hpp +40 -0
- package/src/duckdb/src/include/duckdb/core_functions/scalar/union_functions.hpp +43 -0
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/base_csv_reader.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_type.hpp +4 -0
- package/src/duckdb/src/include/duckdb/function/aggregate/distributive_functions.hpp +0 -85
- package/src/duckdb/src/include/duckdb/function/built_in_functions.hpp +0 -8
- package/src/duckdb/src/include/duckdb/function/function_set.hpp +7 -2
- package/src/duckdb/src/include/duckdb/function/scalar/generic_functions.hpp +1 -36
- package/src/duckdb/src/include/duckdb/function/scalar/nested_functions.hpp +0 -120
- package/src/duckdb/src/include/duckdb/function/scalar/operators.hpp +0 -24
- package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +1 -97
- package/src/duckdb/src/include/duckdb/function/table/read_csv.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/database.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/database_manager.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +0 -2
- package/src/duckdb/src/include/duckdb/main/extension_util.hpp +48 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_function_info.hpp +6 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/pivotref.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +5 -1
- package/src/duckdb/src/main/attached_database.cpp +5 -3
- package/src/duckdb/src/main/database.cpp +34 -37
- package/src/duckdb/src/main/extension/extension_helper.cpp +1 -0
- package/src/duckdb/src/main/extension/extension_load.cpp +61 -38
- package/src/duckdb/src/main/extension/extension_util.cpp +90 -0
- package/src/duckdb/src/parser/transform/statement/transform_create_function.cpp +1 -4
- package/src/duckdb/src/parser/transform/statement/transform_create_view.cpp +2 -4
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +43 -24
- package/src/duckdb/src/parser/transform/tableref/transform_pivot.cpp +3 -0
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +17 -28
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +6 -7
- package/src/duckdb/third_party/fmt/format.cc +0 -5
- package/src/duckdb/third_party/fmt/include/fmt/core.h +10 -12
- package/src/duckdb/third_party/fmt/include/fmt/format-inl.h +2 -33
- package/src/duckdb/third_party/fmt/include/fmt/format.h +61 -24
- package/src/duckdb/third_party/fmt/include/fmt/printf.h +15 -1
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +1 -0
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +10735 -10674
- package/src/duckdb/ub_src_common_enums.cpp +2 -0
- package/src/duckdb/ub_src_core_functions.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_aggregate_algebraic.cpp +8 -0
- package/src/duckdb/ub_src_core_functions_aggregate_distributive.cpp +24 -0
- package/src/duckdb/ub_src_core_functions_aggregate_holistic.cpp +8 -0
- package/src/duckdb/ub_src_core_functions_aggregate_nested.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_aggregate_regression.cpp +14 -0
- package/src/duckdb/ub_src_core_functions_scalar_bit.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_blob.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_date.cpp +22 -0
- package/src/duckdb/ub_src_core_functions_scalar_enum.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_generic.cpp +16 -0
- package/src/duckdb/ub_src_core_functions_scalar_list.cpp +14 -0
- package/src/duckdb/ub_src_core_functions_scalar_map.cpp +12 -0
- package/src/duckdb/ub_src_core_functions_scalar_math.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_operators.cpp +2 -0
- package/src/duckdb/ub_src_core_functions_scalar_random.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_string.cpp +44 -0
- package/src/duckdb/ub_src_core_functions_scalar_struct.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_union.cpp +6 -0
- package/src/duckdb/ub_src_function_aggregate.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_distributive.cpp +0 -24
- package/src/duckdb/ub_src_function_scalar.cpp +2 -8
- package/src/duckdb/ub_src_function_scalar_generic.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_list.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_operators.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_string.cpp +0 -42
- package/src/duckdb/ub_src_function_scalar_struct.cpp +0 -4
- package/src/duckdb/ub_src_function_scalar_system.cpp +0 -2
- package/src/duckdb/ub_src_main_extension.cpp +2 -0
- package/src/duckdb/src/function/aggregate/algebraic/corr.cpp +0 -14
- package/src/duckdb/src/function/aggregate/algebraic/covar.cpp +0 -25
- package/src/duckdb/src/function/aggregate/algebraic/stddev.cpp +0 -54
- package/src/duckdb/src/function/aggregate/algebraic_functions.cpp +0 -21
- package/src/duckdb/src/function/aggregate/holistic_functions.cpp +0 -12
- package/src/duckdb/src/function/aggregate/nested_functions.cpp +0 -10
- package/src/duckdb/src/function/aggregate/regression_functions.cpp +0 -21
- package/src/duckdb/src/function/scalar/date_functions.cpp +0 -22
- package/src/duckdb/src/function/scalar/enum_functions.cpp +0 -13
- package/src/duckdb/src/function/scalar/math_functions.cpp +0 -50
- package/src/duckdb/src/function/scalar/trigonometrics_functions.cpp +0 -18
- package/src/duckdb/src/include/duckdb/function/aggregate/algebraic_functions.hpp +0 -56
- package/src/duckdb/src/include/duckdb/function/aggregate/holistic_functions.hpp +0 -33
- package/src/duckdb/src/include/duckdb/function/aggregate/nested_functions.hpp +0 -26
- package/src/duckdb/src/include/duckdb/function/aggregate/regression_functions.hpp +0 -53
- package/src/duckdb/src/include/duckdb/function/scalar/bit_functions.hpp +0 -32
- package/src/duckdb/src/include/duckdb/function/scalar/blob_functions.hpp +0 -24
- package/src/duckdb/src/include/duckdb/function/scalar/date_functions.hpp +0 -73
- package/src/duckdb/src/include/duckdb/function/scalar/enum_functions.hpp +0 -37
- package/src/duckdb/src/include/duckdb/function/scalar/math_functions.hpp +0 -137
- package/src/duckdb/src/include/duckdb/function/scalar/trigonometric_functions.hpp +0 -49
- package/src/duckdb/ub_src_function_aggregate_algebraic.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_holistic.cpp +0 -8
- package/src/duckdb/ub_src_function_aggregate_nested.cpp +0 -4
- package/src/duckdb/ub_src_function_aggregate_regression.cpp +0 -14
- package/src/duckdb/ub_src_function_scalar_bit.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_blob.cpp +0 -4
- package/src/duckdb/ub_src_function_scalar_date.cpp +0 -22
- package/src/duckdb/ub_src_function_scalar_enum.cpp +0 -2
- package/src/duckdb/ub_src_function_scalar_map.cpp +0 -12
- package/src/duckdb/ub_src_function_scalar_math.cpp +0 -6
- package/src/duckdb/ub_src_function_scalar_union.cpp +0 -6
- /package/src/duckdb/src/include/duckdb/function/scalar/{strftime.hpp → strftime_format.hpp} +0 -0
@@ -0,0 +1,394 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/scalar/math_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct AbsOperatorFun {
|
17
|
+
static constexpr const char *Name = "@";
|
18
|
+
static constexpr const char *Parameters = "x";
|
19
|
+
static constexpr const char *Description = "absolute value";
|
20
|
+
static constexpr const char *Example = "abs(-17.4)";
|
21
|
+
|
22
|
+
static ScalarFunctionSet GetFunctions();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct AbsFun {
|
26
|
+
using ALIAS = AbsOperatorFun;
|
27
|
+
|
28
|
+
static constexpr const char *Name = "abs";
|
29
|
+
};
|
30
|
+
|
31
|
+
struct PowOperatorFun {
|
32
|
+
static constexpr const char *Name = "**";
|
33
|
+
static constexpr const char *Parameters = "x,y";
|
34
|
+
static constexpr const char *Description = "computes x to the power of y";
|
35
|
+
static constexpr const char *Example = "pow(2, 3)";
|
36
|
+
|
37
|
+
static ScalarFunction GetFunction();
|
38
|
+
};
|
39
|
+
|
40
|
+
struct PowFun {
|
41
|
+
using ALIAS = PowOperatorFun;
|
42
|
+
|
43
|
+
static constexpr const char *Name = "pow";
|
44
|
+
};
|
45
|
+
|
46
|
+
struct PowerFun {
|
47
|
+
using ALIAS = PowOperatorFun;
|
48
|
+
|
49
|
+
static constexpr const char *Name = "power";
|
50
|
+
};
|
51
|
+
|
52
|
+
struct PowOperatorFunAlias {
|
53
|
+
using ALIAS = PowOperatorFun;
|
54
|
+
|
55
|
+
static constexpr const char *Name = "^";
|
56
|
+
};
|
57
|
+
|
58
|
+
struct FactorialOperatorFun {
|
59
|
+
static constexpr const char *Name = "!__postfix";
|
60
|
+
static constexpr const char *Parameters = "x";
|
61
|
+
static constexpr const char *Description = "factorial of x. Computes the product of the current integer and all integers below it";
|
62
|
+
static constexpr const char *Example = "4!";
|
63
|
+
|
64
|
+
static ScalarFunction GetFunction();
|
65
|
+
};
|
66
|
+
|
67
|
+
struct FactorialFun {
|
68
|
+
using ALIAS = FactorialOperatorFun;
|
69
|
+
|
70
|
+
static constexpr const char *Name = "factorial";
|
71
|
+
};
|
72
|
+
|
73
|
+
struct AcosFun {
|
74
|
+
static constexpr const char *Name = "acos";
|
75
|
+
static constexpr const char *Parameters = "x";
|
76
|
+
static constexpr const char *Description = "computes the arccosine of x";
|
77
|
+
static constexpr const char *Example = "acos(0.5)";
|
78
|
+
|
79
|
+
static ScalarFunction GetFunction();
|
80
|
+
};
|
81
|
+
|
82
|
+
struct AsinFun {
|
83
|
+
static constexpr const char *Name = "asin";
|
84
|
+
static constexpr const char *Parameters = "x";
|
85
|
+
static constexpr const char *Description = "computes the arcsine of x";
|
86
|
+
static constexpr const char *Example = "asin(0.5)";
|
87
|
+
|
88
|
+
static ScalarFunction GetFunction();
|
89
|
+
};
|
90
|
+
|
91
|
+
struct AtanFun {
|
92
|
+
static constexpr const char *Name = "atan";
|
93
|
+
static constexpr const char *Parameters = "x";
|
94
|
+
static constexpr const char *Description = "computes the arctangent of x";
|
95
|
+
static constexpr const char *Example = "atan(0.5)";
|
96
|
+
|
97
|
+
static ScalarFunction GetFunction();
|
98
|
+
};
|
99
|
+
|
100
|
+
struct Atan2Fun {
|
101
|
+
static constexpr const char *Name = "atan2";
|
102
|
+
static constexpr const char *Parameters = "x,y";
|
103
|
+
static constexpr const char *Description = "computes the arctangent (x, y)";
|
104
|
+
static constexpr const char *Example = "atan2(0.5, 0.5)";
|
105
|
+
|
106
|
+
static ScalarFunction GetFunction();
|
107
|
+
};
|
108
|
+
|
109
|
+
struct BitCountFun {
|
110
|
+
static constexpr const char *Name = "bit_count";
|
111
|
+
static constexpr const char *Parameters = "x";
|
112
|
+
static constexpr const char *Description = "returns the number of bits that are set";
|
113
|
+
static constexpr const char *Example = "bit_count(31)";
|
114
|
+
|
115
|
+
static ScalarFunctionSet GetFunctions();
|
116
|
+
};
|
117
|
+
|
118
|
+
struct CbrtFun {
|
119
|
+
static constexpr const char *Name = "cbrt";
|
120
|
+
static constexpr const char *Parameters = "x";
|
121
|
+
static constexpr const char *Description = "returns the cube root of x";
|
122
|
+
static constexpr const char *Example = "cbrt(8)";
|
123
|
+
|
124
|
+
static ScalarFunction GetFunction();
|
125
|
+
};
|
126
|
+
|
127
|
+
struct CeilFun {
|
128
|
+
static constexpr const char *Name = "ceil";
|
129
|
+
static constexpr const char *Parameters = "x";
|
130
|
+
static constexpr const char *Description = "rounds the number up";
|
131
|
+
static constexpr const char *Example = "ceil(17.4)";
|
132
|
+
|
133
|
+
static ScalarFunctionSet GetFunctions();
|
134
|
+
};
|
135
|
+
|
136
|
+
struct CeilingFun {
|
137
|
+
using ALIAS = CeilFun;
|
138
|
+
|
139
|
+
static constexpr const char *Name = "ceiling";
|
140
|
+
};
|
141
|
+
|
142
|
+
struct CosFun {
|
143
|
+
static constexpr const char *Name = "cos";
|
144
|
+
static constexpr const char *Parameters = "x";
|
145
|
+
static constexpr const char *Description = "computes the cos of x";
|
146
|
+
static constexpr const char *Example = "cos(90)";
|
147
|
+
|
148
|
+
static ScalarFunction GetFunction();
|
149
|
+
};
|
150
|
+
|
151
|
+
struct CotFun {
|
152
|
+
static constexpr const char *Name = "cot";
|
153
|
+
static constexpr const char *Parameters = "x";
|
154
|
+
static constexpr const char *Description = "computes the cotangent of x";
|
155
|
+
static constexpr const char *Example = "cot(0.5)";
|
156
|
+
|
157
|
+
static ScalarFunction GetFunction();
|
158
|
+
};
|
159
|
+
|
160
|
+
struct DegreesFun {
|
161
|
+
static constexpr const char *Name = "degrees";
|
162
|
+
static constexpr const char *Parameters = "x";
|
163
|
+
static constexpr const char *Description = "converts radians to degrees";
|
164
|
+
static constexpr const char *Example = "degrees(pi())";
|
165
|
+
|
166
|
+
static ScalarFunction GetFunction();
|
167
|
+
};
|
168
|
+
|
169
|
+
struct EvenFun {
|
170
|
+
static constexpr const char *Name = "even";
|
171
|
+
static constexpr const char *Parameters = "x";
|
172
|
+
static constexpr const char *Description = "round to next even number by rounding away from zero.";
|
173
|
+
static constexpr const char *Example = "even(2.9)";
|
174
|
+
|
175
|
+
static ScalarFunction GetFunction();
|
176
|
+
};
|
177
|
+
|
178
|
+
struct ExpFun {
|
179
|
+
static constexpr const char *Name = "exp";
|
180
|
+
static constexpr const char *Parameters = "x";
|
181
|
+
static constexpr const char *Description = "computes e to the power of x";
|
182
|
+
static constexpr const char *Example = "exp(1)";
|
183
|
+
|
184
|
+
static ScalarFunction GetFunction();
|
185
|
+
};
|
186
|
+
|
187
|
+
struct FloorFun {
|
188
|
+
static constexpr const char *Name = "floor";
|
189
|
+
static constexpr const char *Parameters = "x";
|
190
|
+
static constexpr const char *Description = "rounds the number down";
|
191
|
+
static constexpr const char *Example = "floor(17.4)";
|
192
|
+
|
193
|
+
static ScalarFunctionSet GetFunctions();
|
194
|
+
};
|
195
|
+
|
196
|
+
struct IsFiniteFun {
|
197
|
+
static constexpr const char *Name = "isfinite";
|
198
|
+
static constexpr const char *Parameters = "x";
|
199
|
+
static constexpr const char *Description = "Returns true if the floating point value is finite, false otherwise";
|
200
|
+
static constexpr const char *Example = "isfinite(5.5)";
|
201
|
+
|
202
|
+
static ScalarFunctionSet GetFunctions();
|
203
|
+
};
|
204
|
+
|
205
|
+
struct IsInfiniteFun {
|
206
|
+
static constexpr const char *Name = "isinf";
|
207
|
+
static constexpr const char *Parameters = "x";
|
208
|
+
static constexpr const char *Description = "Returns true if the floating point value is infinite, false otherwise";
|
209
|
+
static constexpr const char *Example = "isinf('Infinity'::float)";
|
210
|
+
|
211
|
+
static ScalarFunctionSet GetFunctions();
|
212
|
+
};
|
213
|
+
|
214
|
+
struct IsNanFun {
|
215
|
+
static constexpr const char *Name = "isnan";
|
216
|
+
static constexpr const char *Parameters = "x";
|
217
|
+
static constexpr const char *Description = "Returns true if the floating point value is not a number, false otherwise";
|
218
|
+
static constexpr const char *Example = "isnan('NaN'::FLOAT)";
|
219
|
+
|
220
|
+
static ScalarFunctionSet GetFunctions();
|
221
|
+
};
|
222
|
+
|
223
|
+
struct GammaFun {
|
224
|
+
static constexpr const char *Name = "gamma";
|
225
|
+
static constexpr const char *Parameters = "x";
|
226
|
+
static constexpr const char *Description = "interpolation of (x-1) factorial (so decimal inputs are allowed)";
|
227
|
+
static constexpr const char *Example = "gamma(5.5)";
|
228
|
+
|
229
|
+
static ScalarFunction GetFunction();
|
230
|
+
};
|
231
|
+
|
232
|
+
struct GreatestCommonDivisorFun {
|
233
|
+
static constexpr const char *Name = "greatest_common_divisor";
|
234
|
+
static constexpr const char *Parameters = "x,y";
|
235
|
+
static constexpr const char *Description = "computes the greatest common divisor of x and y";
|
236
|
+
static constexpr const char *Example = "greatest_common_divisor(42, 57)";
|
237
|
+
|
238
|
+
static ScalarFunctionSet GetFunctions();
|
239
|
+
};
|
240
|
+
|
241
|
+
struct GcdFun {
|
242
|
+
using ALIAS = GreatestCommonDivisorFun;
|
243
|
+
|
244
|
+
static constexpr const char *Name = "gcd";
|
245
|
+
};
|
246
|
+
|
247
|
+
struct LeastCommonMultipleFun {
|
248
|
+
static constexpr const char *Name = "least_common_multiple";
|
249
|
+
static constexpr const char *Parameters = "x,y";
|
250
|
+
static constexpr const char *Description = "computes the least common multiple of x and y";
|
251
|
+
static constexpr const char *Example = "least_common_multiple(42, 57)";
|
252
|
+
|
253
|
+
static ScalarFunctionSet GetFunctions();
|
254
|
+
};
|
255
|
+
|
256
|
+
struct LcmFun {
|
257
|
+
using ALIAS = LeastCommonMultipleFun;
|
258
|
+
|
259
|
+
static constexpr const char *Name = "lcm";
|
260
|
+
};
|
261
|
+
|
262
|
+
struct LogGammaFun {
|
263
|
+
static constexpr const char *Name = "lgamma";
|
264
|
+
static constexpr const char *Parameters = "x";
|
265
|
+
static constexpr const char *Description = "computes the log of the gamma function.";
|
266
|
+
static constexpr const char *Example = "lgamma(2)";
|
267
|
+
|
268
|
+
static ScalarFunction GetFunction();
|
269
|
+
};
|
270
|
+
|
271
|
+
struct LnFun {
|
272
|
+
static constexpr const char *Name = "ln";
|
273
|
+
static constexpr const char *Parameters = "x";
|
274
|
+
static constexpr const char *Description = "computes the natural logarithm of x";
|
275
|
+
static constexpr const char *Example = "ln(2)";
|
276
|
+
|
277
|
+
static ScalarFunction GetFunction();
|
278
|
+
};
|
279
|
+
|
280
|
+
struct Log2Fun {
|
281
|
+
static constexpr const char *Name = "log2";
|
282
|
+
static constexpr const char *Parameters = "x";
|
283
|
+
static constexpr const char *Description = "computes the 2-log of x";
|
284
|
+
static constexpr const char *Example = "log2(8)";
|
285
|
+
|
286
|
+
static ScalarFunction GetFunction();
|
287
|
+
};
|
288
|
+
|
289
|
+
struct Log10Fun {
|
290
|
+
static constexpr const char *Name = "log10";
|
291
|
+
static constexpr const char *Parameters = "x";
|
292
|
+
static constexpr const char *Description = "computes the 10-log of x";
|
293
|
+
static constexpr const char *Example = "log10(1000)";
|
294
|
+
|
295
|
+
static ScalarFunction GetFunction();
|
296
|
+
};
|
297
|
+
|
298
|
+
struct LogFun {
|
299
|
+
using ALIAS = Log10Fun;
|
300
|
+
|
301
|
+
static constexpr const char *Name = "log";
|
302
|
+
};
|
303
|
+
|
304
|
+
struct NextAfterFun {
|
305
|
+
static constexpr const char *Name = "nextafter";
|
306
|
+
static constexpr const char *Parameters = "x, y";
|
307
|
+
static constexpr const char *Description = "return the next floating point value after x in the direction of y";
|
308
|
+
static constexpr const char *Example = "nextafter(1::float, 2::float)";
|
309
|
+
|
310
|
+
static ScalarFunctionSet GetFunctions();
|
311
|
+
};
|
312
|
+
|
313
|
+
struct PiFun {
|
314
|
+
static constexpr const char *Name = "pi";
|
315
|
+
static constexpr const char *Parameters = "";
|
316
|
+
static constexpr const char *Description = "returns the value of pi";
|
317
|
+
static constexpr const char *Example = "pi()";
|
318
|
+
|
319
|
+
static ScalarFunction GetFunction();
|
320
|
+
};
|
321
|
+
|
322
|
+
struct RadiansFun {
|
323
|
+
static constexpr const char *Name = "radians";
|
324
|
+
static constexpr const char *Parameters = "x";
|
325
|
+
static constexpr const char *Description = "converts degrees to radians";
|
326
|
+
static constexpr const char *Example = "radians(90)";
|
327
|
+
|
328
|
+
static ScalarFunction GetFunction();
|
329
|
+
};
|
330
|
+
|
331
|
+
struct RoundFun {
|
332
|
+
static constexpr const char *Name = "round";
|
333
|
+
static constexpr const char *Parameters = "x,precision";
|
334
|
+
static constexpr const char *Description = "round to s decimal places";
|
335
|
+
static constexpr const char *Example = "round(42.4332, 2)";
|
336
|
+
|
337
|
+
static ScalarFunctionSet GetFunctions();
|
338
|
+
};
|
339
|
+
|
340
|
+
struct SignFun {
|
341
|
+
static constexpr const char *Name = "sign";
|
342
|
+
static constexpr const char *Parameters = "x";
|
343
|
+
static constexpr const char *Description = "returns the sign of x as -1, 0 or 1";
|
344
|
+
static constexpr const char *Example = "sign(-349)";
|
345
|
+
|
346
|
+
static ScalarFunctionSet GetFunctions();
|
347
|
+
};
|
348
|
+
|
349
|
+
struct SignBitFun {
|
350
|
+
static constexpr const char *Name = "signbit";
|
351
|
+
static constexpr const char *Parameters = "x";
|
352
|
+
static constexpr const char *Description = "returns whether the signbit is set or not";
|
353
|
+
static constexpr const char *Example = "signbit(-0.0)";
|
354
|
+
|
355
|
+
static ScalarFunctionSet GetFunctions();
|
356
|
+
};
|
357
|
+
|
358
|
+
struct SinFun {
|
359
|
+
static constexpr const char *Name = "sin";
|
360
|
+
static constexpr const char *Parameters = "x";
|
361
|
+
static constexpr const char *Description = "computes the sin of x";
|
362
|
+
static constexpr const char *Example = "sin(90)";
|
363
|
+
|
364
|
+
static ScalarFunction GetFunction();
|
365
|
+
};
|
366
|
+
|
367
|
+
struct SqrtFun {
|
368
|
+
static constexpr const char *Name = "sqrt";
|
369
|
+
static constexpr const char *Parameters = "x";
|
370
|
+
static constexpr const char *Description = "returns the square root of x";
|
371
|
+
static constexpr const char *Example = "sqrt(4)";
|
372
|
+
|
373
|
+
static ScalarFunction GetFunction();
|
374
|
+
};
|
375
|
+
|
376
|
+
struct TanFun {
|
377
|
+
static constexpr const char *Name = "tan";
|
378
|
+
static constexpr const char *Parameters = "x";
|
379
|
+
static constexpr const char *Description = "computes the tan of x";
|
380
|
+
static constexpr const char *Example = "tan(90)";
|
381
|
+
|
382
|
+
static ScalarFunction GetFunction();
|
383
|
+
};
|
384
|
+
|
385
|
+
struct TruncFun {
|
386
|
+
static constexpr const char *Name = "trunc";
|
387
|
+
static constexpr const char *Parameters = "x";
|
388
|
+
static constexpr const char *Description = "truncates the number";
|
389
|
+
static constexpr const char *Example = "trunc(17.4)";
|
390
|
+
|
391
|
+
static ScalarFunctionSet GetFunctions();
|
392
|
+
};
|
393
|
+
|
394
|
+
} // namespace duckdb
|
@@ -0,0 +1,70 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/scalar/operators_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct BitwiseAndFun {
|
17
|
+
static constexpr const char *Name = "&";
|
18
|
+
static constexpr const char *Parameters = "left,right";
|
19
|
+
static constexpr const char *Description = "Bitwise AND";
|
20
|
+
static constexpr const char *Example = "91 & 15";
|
21
|
+
|
22
|
+
static ScalarFunctionSet GetFunctions();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct BitwiseOrFun {
|
26
|
+
static constexpr const char *Name = "|";
|
27
|
+
static constexpr const char *Parameters = "left,right";
|
28
|
+
static constexpr const char *Description = "Bitwise OR";
|
29
|
+
static constexpr const char *Example = "32 & 3";
|
30
|
+
|
31
|
+
static ScalarFunctionSet GetFunctions();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct BitwiseNotFun {
|
35
|
+
static constexpr const char *Name = "~";
|
36
|
+
static constexpr const char *Parameters = "input";
|
37
|
+
static constexpr const char *Description = "Bitwise NOT";
|
38
|
+
static constexpr const char *Example = "~15";
|
39
|
+
|
40
|
+
static ScalarFunctionSet GetFunctions();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct LeftShiftFun {
|
44
|
+
static constexpr const char *Name = "<<";
|
45
|
+
static constexpr const char *Parameters = "input";
|
46
|
+
static constexpr const char *Description = "bitwise shift left";
|
47
|
+
static constexpr const char *Example = "1 << 4";
|
48
|
+
|
49
|
+
static ScalarFunctionSet GetFunctions();
|
50
|
+
};
|
51
|
+
|
52
|
+
struct RightShiftFun {
|
53
|
+
static constexpr const char *Name = ">>";
|
54
|
+
static constexpr const char *Parameters = "input";
|
55
|
+
static constexpr const char *Description = "bitwise shift right";
|
56
|
+
static constexpr const char *Example = "8 >> 2";
|
57
|
+
|
58
|
+
static ScalarFunctionSet GetFunctions();
|
59
|
+
};
|
60
|
+
|
61
|
+
struct BitwiseXorFun {
|
62
|
+
static constexpr const char *Name = "xor";
|
63
|
+
static constexpr const char *Parameters = "left,right";
|
64
|
+
static constexpr const char *Description = "Bitwise XOR";
|
65
|
+
static constexpr const char *Example = "xor(17, 5)";
|
66
|
+
|
67
|
+
static ScalarFunctionSet GetFunctions();
|
68
|
+
};
|
69
|
+
|
70
|
+
} // namespace duckdb
|
@@ -0,0 +1,49 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/core_functions/scalar/random_functions.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
// This file is generated by scripts/generate_functions.py
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include "duckdb/function/function_set.hpp"
|
13
|
+
|
14
|
+
namespace duckdb {
|
15
|
+
|
16
|
+
struct RandomFun {
|
17
|
+
static constexpr const char *Name = "random";
|
18
|
+
static constexpr const char *Parameters = "";
|
19
|
+
static constexpr const char *Description = "returns a random number between 0 and 1";
|
20
|
+
static constexpr const char *Example = "random()";
|
21
|
+
|
22
|
+
static ScalarFunction GetFunction();
|
23
|
+
};
|
24
|
+
|
25
|
+
struct SetseedFun {
|
26
|
+
static constexpr const char *Name = "setseed";
|
27
|
+
static constexpr const char *Parameters = "";
|
28
|
+
static constexpr const char *Description = "sets the seed to be used for the random function";
|
29
|
+
static constexpr const char *Example = "setseed(0.42)";
|
30
|
+
|
31
|
+
static ScalarFunction GetFunction();
|
32
|
+
};
|
33
|
+
|
34
|
+
struct UUIDFun {
|
35
|
+
static constexpr const char *Name = "uuid";
|
36
|
+
static constexpr const char *Parameters = "";
|
37
|
+
static constexpr const char *Description = "Return a random uuid similar to this: eeccb8c5-9943-b2bb-bb5e-222f4e14b687";
|
38
|
+
static constexpr const char *Example = "uuid()";
|
39
|
+
|
40
|
+
static ScalarFunction GetFunction();
|
41
|
+
};
|
42
|
+
|
43
|
+
struct GenRandomUuidFun {
|
44
|
+
using ALIAS = UUIDFun;
|
45
|
+
|
46
|
+
static constexpr const char *Name = "gen_random_uuid";
|
47
|
+
};
|
48
|
+
|
49
|
+
} // namespace duckdb
|