From cdff313211b6ed42d989ab6775c176737afff11f Mon Sep 17 00:00:00 2001 From: Elliana May Date: Tue, 1 Aug 2023 10:45:05 +0800 Subject: [PATCH 1/4] add test pages --- _plugins/duckdb_functions.rb | 1 + docs/test.md | 17 ----------------- docs/test/functions/enum.md | 7 +++++++ docs/test/functions/general.md | 7 +++++++ docs/test/functions/math.md | 7 +++++++ docs/test/functions/overview.md | 20 ++++++++++++++++++++ 6 files changed, 42 insertions(+), 17 deletions(-) delete mode 100644 docs/test.md create mode 100644 docs/test/functions/enum.md create mode 100644 docs/test/functions/general.md create mode 100644 docs/test/functions/math.md create mode 100644 docs/test/functions/overview.md diff --git a/_plugins/duckdb_functions.rb b/_plugins/duckdb_functions.rb index 80110fa0dc3..c7da3e39d42 100644 --- a/_plugins/duckdb_functions.rb +++ b/_plugins/duckdb_functions.rb @@ -87,6 +87,7 @@ def render(context) Jekyll.logger.info(@tag_name, "Loaded #{functions.size} functions") filtered = functions.filter { |function| this.select_function(filter_expression, function) }.sort_by { |f| f['name'] } Jekyll.logger.info(@tag_name, "Filtered down to #{filtered.size} functions with expression: #{filter_expression}") + throw "No functions found for filter: #{filter_expression}" if filtered.empty? puts generate_index(page, filtered) diff --git a/docs/test.md b/docs/test.md deleted file mode 100644 index 5ec42f2c359..00000000000 --- a/docs/test.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: test -layout: docu ---- - -# Scalar Functions -{% duckdb_functions function['type'] == 'scalar_function' %} - -# Aggregate Functions -{% duckdb_functions function['type'] == 'aggregate_function' %} - -# Scalar Function Set -{% duckdb_functions function['type'] == 'scalar_function_set' %} - -# Aggregate Function Set -{% duckdb_functions function['type'] == 'aggregate_function_set' %} - diff --git a/docs/test/functions/enum.md b/docs/test/functions/enum.md new file mode 100644 index 00000000000..45b745ad47f --- /dev/null +++ b/docs/test/functions/enum.md @@ -0,0 +1,7 @@ +--- +title: Enum Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'enum' %} + diff --git a/docs/test/functions/general.md b/docs/test/functions/general.md new file mode 100644 index 00000000000..aa6942ffd99 --- /dev/null +++ b/docs/test/functions/general.md @@ -0,0 +1,7 @@ +--- +title: General Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'generic' %} + diff --git a/docs/test/functions/math.md b/docs/test/functions/math.md new file mode 100644 index 00000000000..7679f61223a --- /dev/null +++ b/docs/test/functions/math.md @@ -0,0 +1,7 @@ +--- +title: Math Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'math' %} + diff --git a/docs/test/functions/overview.md b/docs/test/functions/overview.md new file mode 100644 index 00000000000..6614c523ede --- /dev/null +++ b/docs/test/functions/overview.md @@ -0,0 +1,20 @@ +--- +name: Overview +layout: docu +--- + + * Bitstring Functions + * Blob Functions + * Date Format Functions + * Date Functions + * Date Part Functions + * Enum Functions + * Interval Functions + * Nested Functions + * Numeric Functions + * Pattern Matching + * Text Functions + * Time Functions + * Timestamp Functions + * Timestamp With Time Zone Functions + * Utility Functions From d289500e7d575d37a4dbd2a33b6c8d9b433c968f Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 7 Aug 2023 11:23:30 +0800 Subject: [PATCH 2/4] even more pages --- docs/test/functions/bitstring.md | 7 +++++++ docs/test/functions/blob.md | 7 +++++++ docs/test/functions/char.md | 7 +++++++ docs/test/functions/date.md | 7 +++++++ docs/test/functions/general.md | 7 ------- docs/test/functions/nested.md | 17 +++++++++++++++++ docs/test/functions/patternmatching.md | 7 +++++++ docs/test/functions/utility.md | 7 +++++++ 8 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 docs/test/functions/bitstring.md create mode 100644 docs/test/functions/blob.md create mode 100644 docs/test/functions/char.md create mode 100644 docs/test/functions/date.md delete mode 100644 docs/test/functions/general.md create mode 100644 docs/test/functions/nested.md create mode 100644 docs/test/functions/patternmatching.md create mode 100644 docs/test/functions/utility.md diff --git a/docs/test/functions/bitstring.md b/docs/test/functions/bitstring.md new file mode 100644 index 00000000000..1418624d3ac --- /dev/null +++ b/docs/test/functions/bitstring.md @@ -0,0 +1,7 @@ +--- +title: Bitstring Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'bit' %} + diff --git a/docs/test/functions/blob.md b/docs/test/functions/blob.md new file mode 100644 index 00000000000..77b4c743e02 --- /dev/null +++ b/docs/test/functions/blob.md @@ -0,0 +1,7 @@ +--- +title: Blob Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'blob' %} + diff --git a/docs/test/functions/char.md b/docs/test/functions/char.md new file mode 100644 index 00000000000..8e4cb459845 --- /dev/null +++ b/docs/test/functions/char.md @@ -0,0 +1,7 @@ +--- +title: String Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'char' %} + diff --git a/docs/test/functions/date.md b/docs/test/functions/date.md new file mode 100644 index 00000000000..ddbb3b3878d --- /dev/null +++ b/docs/test/functions/date.md @@ -0,0 +1,7 @@ +--- +title: Date Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'date' %} + diff --git a/docs/test/functions/general.md b/docs/test/functions/general.md deleted file mode 100644 index aa6942ffd99..00000000000 --- a/docs/test/functions/general.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: General Functions -layout: docu ---- - -{% duckdb_functions function['category'] == 'generic' %} - diff --git a/docs/test/functions/nested.md b/docs/test/functions/nested.md new file mode 100644 index 00000000000..7ccb903e259 --- /dev/null +++ b/docs/test/functions/nested.md @@ -0,0 +1,17 @@ +--- +title: Nested Functions +layout: docu +--- + +## List Functions +{% duckdb_functions function['category'] == 'list' %} + +## Map Functions +{% duckdb_functions function['category'] == 'map' %} + +## Struct Functions +{% duckdb_functions function['category'] == 'struct' %} + +## Union Functions +{% duckdb_functions function['category'] == 'union' %} + diff --git a/docs/test/functions/patternmatching.md b/docs/test/functions/patternmatching.md new file mode 100644 index 00000000000..bccf47cf3b6 --- /dev/null +++ b/docs/test/functions/patternmatching.md @@ -0,0 +1,7 @@ +--- +title: Pattern Matching Functions +layout: docu +--- + +{% duckdb_functions function['name'].include? 'regexp' %} + diff --git a/docs/test/functions/utility.md b/docs/test/functions/utility.md new file mode 100644 index 00000000000..a51053e806d --- /dev/null +++ b/docs/test/functions/utility.md @@ -0,0 +1,7 @@ +--- +title: Utility Functions +layout: docu +--- + +{% duckdb_functions function['category'] == 'generic' || function['category'] == 'random' %} + From bf6dc61dbe575952a0cf67f8ed10b46dc5ea0df3 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 7 Aug 2023 11:26:57 +0800 Subject: [PATCH 3/4] correct category --- docs/test/functions/char.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/test/functions/char.md b/docs/test/functions/char.md index 8e4cb459845..844e26f05fd 100644 --- a/docs/test/functions/char.md +++ b/docs/test/functions/char.md @@ -3,5 +3,5 @@ title: String Functions layout: docu --- -{% duckdb_functions function['category'] == 'char' %} +{% duckdb_functions function['category'] == 'string' %} From 56e5d5b280c88404215a091b2eaa379be47a8026 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 7 Aug 2023 11:33:36 +0800 Subject: [PATCH 4/4] rm dud page --- docs/test/functions/patternmatching.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docs/test/functions/patternmatching.md diff --git a/docs/test/functions/patternmatching.md b/docs/test/functions/patternmatching.md deleted file mode 100644 index bccf47cf3b6..00000000000 --- a/docs/test/functions/patternmatching.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Pattern Matching Functions -layout: docu ---- - -{% duckdb_functions function['name'].include? 'regexp' %} -