@@ -6,7 +6,11 @@ As an alternative to compiling C extensions like
66[ mattn/go-sqlite3] ( https://github.com/mattn/go-sqlite3 ) , this package
77implements many of these functions (and more from PostgreSQL) in Go.
88
9- ## Example
9+ This is mostly bindings to Go standard library functions or some
10+ third-party libraries like [ gonum] ( https://gonum.org/v1/gonum ) and
11+ [ dateparse] ( https://github.com/araddon/dateparse ) .
12+
13+ # Example
1014
1115``` go
1216package main
@@ -37,22 +41,22 @@ func main() {
3741
3842```
3943
40- ## How is this tested?
44+ # How is this tested?
4145
4246There is 95% test coverage and automated tests on Windows, macOS and
4347Linux.
4448
45- ## I just want to use it as a CLI or GUI
49+ # I just want to use it as a CLI or GUI
4650
4751See [ dsq] ( https://github.com/multiprocessio/dsq ) (a command-line tool
4852for executing SQL on data files) and
4953[ DataStation] ( https://github.com/multiprocessio/datastation ) , a GUI
5054application for querying and building reports with data from
5155databases, servers, and files.
5256
53- ## Functions
57+ # Functions
5458
55- ### Strings
59+ ## Strings
5660
5761| Name(s) | Notes | Example |
5862| ------------------------ | ---- | --- |
@@ -65,7 +69,7 @@ databases, servers, and files.
6569| lpad | Omit the second argument to default to padding with spaces | ` lpad('22', 3, '0') = '022' ` |
6670| rpad | Omit the second argument to default to padding with spaces | ` rpad('22', 3, '0') = '220' ` |
6771
68- ### Aggregation
72+ ## Aggregation
6973
7074| Name(s) | Notes | Example |
7175| ------------------------ | ---- | --- |
@@ -77,7 +81,7 @@ databases, servers, and files.
7781| percentile_cont, perc_cont | Continuous | ` perc_cont(response_time, 95) ` |
7882| percentile_cont_25, perc_cont_25, percentile_cont_50, perc_cont_50, percentile_cont_75, perc_cont_75, percentile_cont_90, perc_cont_90, percentile_cont_95, perc_cont_95, percentile_cont_99, perc_cont_99| Continuous | ` perc_cont_99(response_time) ` |
7983
80- ### Net
84+ ## Net
8185
8286| Name(s) | Notes | Example |
8387| ------------------------ | ---- | --- |
@@ -88,7 +92,7 @@ databases, servers, and files.
8892| url_param | | ` url_param('https://x.com/home.html?p=123&z=%5B1%2C2%5D#section-1', 'z') = '[1,2]' ` |
8993| url_fragment | | ` url_fragment('https://x.com/home.html?p=123&z=%5B1%2C2%5D#section-1') = 'section-1' ` |
9094
91- ### Date
95+ ## Date
9296
9397Best effort family of date parsing and retrieval. Results will differ
9498depending on your computer's timezone.
@@ -103,13 +107,13 @@ depending on your computer's timezone.
103107| date_minute | | ` date_minute('May 6, 2021 4:50') = 50 ` |
104108| date_second | | ` date_second('May 6, 2021 4:50:20') = 20 ` |
105109| date_unix | | ` date_unix('May 6, 2021 4:50:20') = 1588740620 ` |
106- | date_rfc3339 | | ` date_unix ('May 6, 2021 4:50:20') = 2020-05-06T04:50:20Z` |
110+ | date_rfc3339 | | ` date_rfc3339 ('May 6, 2021 4:50:20') = 2020-05-06T04:50:20Z` |
107111
108- ### Regexp
112+ ## Regexp
109113
110114* regexp: ` x REGEXP '[a-z]+$' ` (uses Go's regexp, not PCRE)
111115
112- ### Math
116+ ## Math
113117
114118* acos
115119* acosh
@@ -137,3 +141,18 @@ depending on your computer's timezone.
137141* tan
138142* tanh
139143* trunc, truncate
144+
145+ # Contribute
146+
147+ Join the [ #dev channel on the Multiprocess Labs
148+ Discord] ( https://discord.gg/22ZCpaS9qm ) .
149+
150+ If you have an idea for a new function, say so on the Discord channel
151+ or open an issue here.
152+
153+ Make sure the function doesn't already exist in dsq (or the sqlite3
154+ CLI).
155+
156+ # License
157+
158+ This software is licensed under an Apache 2.0 license.
0 commit comments