@edadma/rdb 0.1.5 → 0.1.6
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/README.md +7 -6
- package/main.js +40029 -37049
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ RDB follows PostgreSQL conventions:
|
|
|
72
72
|
| `NUMERIC(p, s)` / `DECIMAL(p, s)` | Fixed-precision decimal |
|
|
73
73
|
| `TEXT` | Variable-length string |
|
|
74
74
|
| `CHAR(n)` | Fixed-length string |
|
|
75
|
+
| `VARCHAR(n)` | Variable-length string (max n chars) |
|
|
75
76
|
| `BOOLEAN` | True/false |
|
|
76
77
|
| `DATE` / `TIME` / `TIMESTAMP` | Date and time types |
|
|
77
78
|
| `TIMESTAMP WITH TIME ZONE` | Timezone-aware timestamp |
|
|
@@ -143,17 +144,17 @@ DEALLOCATE name
|
|
|
143
144
|
|
|
144
145
|
### Aggregate Functions
|
|
145
146
|
|
|
146
|
-
`COUNT`, `SUM`, `AVG`, `MIN`, `MAX`, `string_agg`, `array_agg`, `bool_and`, `bool_or`, `variance`, `var_samp`, `var_pop`, `stddev`, `stddev_samp`, `stddev_pop`
|
|
147
|
+
`COUNT`, `SUM`, `AVG`, `MIN`, `MAX`, `string_agg`, `array_agg`, `bool_and`, `bool_or`, `every`, `variance`, `var_samp`, `var_pop`, `stddev`, `stddev_samp`, `stddev_pop`
|
|
147
148
|
|
|
148
149
|
### Built-in Functions
|
|
149
150
|
|
|
150
|
-
**Text:** `lower`, `upper`, `initcap`, `length`, `trim`, `ltrim`, `rtrim`, `substring`, `left`, `right`, `lpad`, `rpad`, `replace`, `concat`, `concat_ws`, `repeat`, `reverse`, `position`, `split_part`, `ascii`, `chr`, `regexp_replace`, `regexp_match`, `starts_with`, `ends_with`
|
|
151
|
+
**Text:** `lower`, `upper`, `initcap`, `length`, `trim`, `ltrim`, `rtrim`, `btrim`, `substring`, `left`, `right`, `lpad`, `rpad`, `replace`, `translate`, `concat`, `concat_ws`, `repeat`, `reverse`, `position`, `split_part`, `ascii`, `chr`, `regexp_replace`, `regexp_match`, `starts_with`, `ends_with`
|
|
151
152
|
|
|
152
|
-
**Numeric:** `abs`, `ceil`, `floor`, `round`, `trunc`, `sign`, `mod`, `power`, `sqrt`, `exp`, `ln`, `log10`, `log`, `pi`, `degrees`, `radians`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `atan2`, `random`, `greatest`, `least`
|
|
153
|
+
**Numeric:** `abs`, `ceil`, `floor`, `round`, `trunc`, `sign`, `mod`, `%`, `power`, `sqrt`, `cbrt`, `exp`, `ln`, `log10`, `log`, `pi`, `degrees`, `radians`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `atan2`, `sinh`, `cosh`, `tanh`, `asinh`, `acosh`, `atanh`, `div`, `factorial`, `gcd`, `lcm`, `random`, `greatest`, `least`
|
|
153
154
|
|
|
154
|
-
**Date/Time:** `now`, `current_date`, `current_time`, `date_part`, `EXTRACT`, `date_trunc`, `make_date`, `make_time`, `age`, `to_char`, `to_date`, `to_timestamp`
|
|
155
|
+
**Date/Time:** `now`, `current_date`, `current_time`, `date_part`, `EXTRACT`, `date_trunc`, `make_date`, `make_time`, `make_timestamp`, `make_interval`, `age`, `to_char`, `to_date`, `to_timestamp`, `to_number`, `isfinite`
|
|
155
156
|
|
|
156
|
-
**Array:** `array_length`, `array_append`, `array_prepend`, `array_concat`, `array_slice`, `array_remove`, `array_position`, `array_distinct`, `string_to_array`, `array_to_string`
|
|
157
|
+
**Array:** `array_length`, `array_append`, `array_prepend`, `array_concat`, `array_cat`, `array_slice`, `array_remove`, `array_replace`, `array_position`, `array_distinct`, `array_lower`, `array_upper`, `array_ndims`, `cardinality`, `string_to_array`, `array_to_string`
|
|
157
158
|
|
|
158
159
|
**Other:** `coalesce`, `nullif`, `typeof`, `gen_random_uuid`, `octet_length`, `encode`, `decode`
|
|
159
160
|
|
|
@@ -211,7 +212,7 @@ Every result has a `command` field for easy discrimination:
|
|
|
211
212
|
| SQL Type | JavaScript Type |
|
|
212
213
|
|----------|----------------|
|
|
213
214
|
| INT, BIGINT, DOUBLE, NUMERIC | `number` |
|
|
214
|
-
| TEXT, CHAR | `string` |
|
|
215
|
+
| TEXT, CHAR, VARCHAR | `string` |
|
|
215
216
|
| BOOLEAN | `boolean` |
|
|
216
217
|
| UUID | `string` |
|
|
217
218
|
| TIMESTAMP | `Date` |
|