mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
IEEE754 extension.
This commit is contained in:
@@ -12,6 +12,7 @@ The following optional features are compiled in:
|
||||
- [soundex](https://sqlite.org/lang_corefunc.html#soundex)
|
||||
- [base64](https://github.com/sqlite/sqlite/blob/master/ext/misc/base64.c)
|
||||
- [decimal](https://github.com/sqlite/sqlite/blob/master/ext/misc/decimal.c)
|
||||
- [ieee754](https://github.com/sqlite/sqlite/blob/master/ext/misc/ieee754.c)
|
||||
- [regexp](https://github.com/sqlite/sqlite/blob/master/ext/misc/regexp.c)
|
||||
- [series](https://github.com/sqlite/sqlite/blob/master/ext/misc/series.c)
|
||||
- [uint](https://github.com/sqlite/sqlite/blob/master/ext/misc/uint.c)
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
// Package hash provides cryptographic hash functions.
|
||||
//
|
||||
// Functions:
|
||||
// Provided functions:
|
||||
// - md4(data)
|
||||
// - md5(data)
|
||||
// - sha1(data)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package stats provides aggregate functions for statistics.
|
||||
//
|
||||
// Functions:
|
||||
// Provided functions:
|
||||
// - stddev_pop: population standard deviation
|
||||
// - stddev_samp: sample standard deviation
|
||||
// - var_pop: population variance
|
||||
@@ -9,8 +9,16 @@
|
||||
// - covar_samp: sample covariance
|
||||
// - corr: correlation coefficient
|
||||
//
|
||||
// These join the [Built-in Aggregate Functions]:
|
||||
// - count: count rows/values
|
||||
// - sum: sum values
|
||||
// - avg: average value
|
||||
// - min: minimum value
|
||||
// - max: maximum value
|
||||
//
|
||||
// See: [ANSI SQL Aggregate Functions]
|
||||
//
|
||||
// [Built-in Aggregate Functions]: https://sqlite.org/lang_aggfunc.html
|
||||
// [ANSI SQL Aggregate Functions]: https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html
|
||||
package stats
|
||||
|
||||
|
||||
45
ext/stats/todo.md
Normal file
45
ext/stats/todo.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# ANSI SQL Aggregate Functions
|
||||
|
||||
https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html
|
||||
|
||||
## Built in
|
||||
|
||||
- [x] `COUNT(*)`
|
||||
- [x] `COUNT(expression)`
|
||||
- [x] `SUM(expression)`
|
||||
- [x] `AVG(expression)`
|
||||
- [x] `MIN(expression)`
|
||||
- [x] `MAX(expression)`
|
||||
|
||||
https://sqlite.org/lang_aggfunc.html
|
||||
|
||||
## Implemented
|
||||
|
||||
- [x] `STDDEV_POP(expression)`
|
||||
- [x] `STDDEV_SAMP(expression)`
|
||||
- [x] `VAR_POP(expression)`
|
||||
- [x] `VAR_SAMP(expression)`
|
||||
- [x] `COVAR_POP(dependent, independent)`
|
||||
- [x] `COVAR_SAMP(dependent, independent)`
|
||||
- [x] `CORR(dependent, independent)`
|
||||
|
||||
## Linear regression
|
||||
|
||||
- [ ] `REGR_AVGX(dependent, independent)`
|
||||
- [ ] `REGR_AVGY(dependent, independent)`
|
||||
- [ ] `REGR_COUNT(dependent, independent)`
|
||||
- [ ] `REGR_INTERCEPT(dependent, independent)`
|
||||
- [ ] `REGR_R2(dependent, independent)`
|
||||
- [ ] `REGR_SLOPE(dependent, independent)`
|
||||
- [ ] `REGR_SXX(dependent, independent)`
|
||||
- [ ] `REGR_SXY(dependent, independent)`
|
||||
- [ ] `REGR_SYY(dependent, independent)`
|
||||
|
||||
## Other
|
||||
|
||||
- [ ] `CUME_DIST(value_list) WITHIN GROUP (ORDER BY sort_list)`
|
||||
- [ ] `RANK(value_list) WITHIN GROUP (ORDER BY sort_list)`
|
||||
- [ ] `DENSE_RANK(value_list) WITHIN GROUP (ORDER BY sort_list)`
|
||||
- [ ] `PERCENT_RANK(value_list) WITHIN GROUP (ORDER BY sort_list)`
|
||||
- [ ] `PERCENTILE_CONT(percentile) WITHIN GROUP (ORDER BY sort_list)`
|
||||
- [ ] `PERCENTILE_DISC(percentile) WITHIN GROUP (ORDER BY sort_list)`
|
||||
11
ext/todo.txt
11
ext/todo.txt
@@ -1,13 +1,4 @@
|
||||
ieee754
|
||||
ieee754_exponent
|
||||
ieee754_from_blob
|
||||
ieee754_inc
|
||||
ieee754_mantissa
|
||||
ieee754_to_blob
|
||||
|
||||
zipfile
|
||||
zipfile_cds
|
||||
sqlar_compress
|
||||
sqlar_uncompress
|
||||
|
||||
remember
|
||||
sqlar_uncompress
|
||||
@@ -12,13 +12,14 @@ cat *.patch | patch --no-backup-if-mismatch
|
||||
|
||||
mkdir -p ext/
|
||||
cd ext/
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/decimal.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/uint.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/uuid.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/anycollseq.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/base64.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/decimal.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/ieee754.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/regexp.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/series.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/anycollseq.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/uint.c"
|
||||
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.44.2/ext/misc/uuid.c"
|
||||
cd ~-
|
||||
|
||||
cd ../vfs/tests/mptest/testdata/
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "ext/anycollseq.c"
|
||||
#include "ext/base64.c"
|
||||
#include "ext/decimal.c"
|
||||
#include "ext/ieee754.c"
|
||||
#include "ext/regexp.c"
|
||||
#include "ext/series.c"
|
||||
#include "ext/uint.c"
|
||||
@@ -23,6 +24,7 @@ __attribute__((constructor)) void init() {
|
||||
sqlite3_initialize();
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_base_init);
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_decimal_init);
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_ieee_init);
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_regexp_init);
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_series_init);
|
||||
sqlite3_auto_extension((void (*)(void))sqlite3_uint_init);
|
||||
|
||||
4
vfs/tests/mptest/testdata/mptest.wasm.bz2
vendored
4
vfs/tests/mptest/testdata/mptest.wasm.bz2
vendored
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:91dade19dcd4509f47cb09f16af0cdf7eb2b09cef0e43a0e1ee380629a8c9778
|
||||
size 512403
|
||||
oid sha256:26d3b9d9bd6b3baf8d5e0064a4927c088c44001d1d69fe8c521430d355f8f67e
|
||||
size 512655
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ff3c4ed5a8579206a2e48c4f8e72f483288f8b113b4664e92cb308a977556a42
|
||||
size 526453
|
||||
oid sha256:63160e8453cf69a27457cbb77a9ce1994a6617717278483448d8bceab5c5bf5d
|
||||
size 526662
|
||||
|
||||
Reference in New Issue
Block a user