Skip to content

Commit

Permalink
Update markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
dadepo committed Nov 19, 2023
1 parent ded9e2b commit 7f92edd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
36 changes: 18 additions & 18 deletions supports/postgres.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
### Network Address Functions
https://www.postgresql.org/docs/16/functions-net.html

| Implemented | Function | Return Type | Description | Example | Result |
|-------------|-------------------------|-------------|-----------------------------------------------------------|------------------------------------------------------|-----------------|
| | abbrev(inet) | text | abbreviated display format as text | abbrev(inet '10.1.0.0/16') | 10.1.0.0/16 |
| | abbrev(cidr) | text | abbreviated display format as text | abbrev(cidr '10.1.0.0/16') | 10.1/16 |
| | broadcast(inet) | inet | broadcast address for network | broadcast('192.168.1.5/24') | 192.168.1.255/24|
| | family(inet) | int | extract family of address; 4 for IPv4, 6 for IPv6 | family('::1') | 6 |
| | host(inet) | text | extract IP address as text | host('192.168.1.5/24') | 192.168.1.5 |
| | hostmask(inet) | inet | construct host mask for network | hostmask('192.168.23.20/30') | 0.0.0.3 |
| | masklen(inet) | int | extract netmask length | masklen('192.168.1.5/24') | 24 |
| | netmask(inet) | inet | construct netmask for network | netmask('192.168.1.5/24') | 255.255.255.0 |
| | network(inet) | cidr | extract network part of address | network('192.168.1.5/24') | 192.168.1.0/24 |
| | set_masklen(inet, int) | inet | set netmask length for inet value | set_masklen('192.168.1.5/24', 16) | 192.168.1.5/16 |
| | set_masklen(cidr, int) | cidr | set netmask length for cidr value | set_masklen('192.168.1.0/24'::cidr, 16) | 192.168.0.0/16 |
| | text(inet) | text | extract IP address and netmask length as text | text(inet '192.168.1.5') | 192.168.1.5/32 |
| | inet_same_family(inet, inet) | boolean | are the addresses from the same family? | inet_same_family('192.168.1.5/24', '::1') | false |
| | inet_merge(inet, inet) | cidr | the smallest network which includes both of the given networks | inet_merge('192.168.1.5/24', '192.168.2.5/24') |
| Implemented | Function | Return Type | Description | Example | Result |
|-------------|------------------------------|-------------|----------------------------------------------------------------|------------------------------------------------|------------------|
| | abbrev(inet) | text | abbreviated display format as text | abbrev(inet '10.1.0.0/16') | 10.1.0.0/16 |
| | abbrev(cidr) | text | abbreviated display format as text | abbrev(cidr '10.1.0.0/16') | 10.1/16 |
| ✅︎ | broadcast(inet) | inet | broadcast address for network | broadcast('192.168.1.5/24') | 192.168.1.255/24 |
| ✅︎ | family(inet) | int | extract family of address; 4 for IPv4, 6 for IPv6 | family('::1') | 6 |
| ✅︎ | host(inet) | text | extract IP address as text | host('192.168.1.5/24') | 192.168.1.5 |
| ✅︎ | hostmask(inet) | inet | construct host mask for network | hostmask('192.168.23.20/30') | 0.0.0.3 |
| ✅︎ | masklen(inet) | int | extract netmask length | masklen('192.168.1.5/24') | 24 |
| ✅︎ | netmask(inet) | inet | construct netmask for network | netmask('192.168.1.5/24') | 255.255.255.0 |
| ✅︎ | network(inet) | cidr | extract network part of address | network('192.168.1.5/24') | 192.168.1.0/24 |
| ✅︎ | set_masklen(inet, int) | inet | set netmask length for inet value | set_masklen('192.168.1.5/24', 16) | 192.168.1.5/16 |
| ✅︎ | set_masklen(cidr, int) | cidr | set netmask length for cidr value | set_masklen('192.168.1.0/24'::cidr, 16) | 192.168.0.0/16 |
| | text(inet) | text | extract IP address and netmask length as text | text(inet '192.168.1.5') | 192.168.1.5/32 |
| ✅︎ | inet_same_family(inet, inet) | boolean | are the addresses from the same family? | inet_same_family('192.168.1.5/24', '::1') | false |
| ✅︎ | inet_merge(inet, inet) | cidr | the smallest network which includes both of the given networks | inet_merge('192.168.1.5/24', '192.168.2.5/24') |

### Mathematics Functions
https://www.postgresql.org/docs/16/functions-math.html

| Implemented | Function | Description | Example |
|-------------|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|
| | ceiling ( numeric ) → numeric | Nearest integer greater than or equal to argument (same as ceil) | ceiling(95.3) → 96 |
| | div ( y numeric, x numeric ) → numeric | Integer quotient of y/x (truncates towards zero) | div(9, 4) → 2 |
| ✅︎ | ceiling ( numeric ) → numeric | Nearest integer greater than or equal to argument (same as ceil) | ceiling(95.3) → 96 |
| ✅︎ | div ( y numeric, x numeric ) → numeric | Integer quotient of y/x (truncates towards zero) | div(9, 4) → 2 |
|| erf ( double precision ) → double precision | Error function | erf(1.0) → 0.8427007929497149 |
|| erfc ( double precision ) → double precision | Complementary error function (1 - erf(x), without loss of precision for large inputs) | erfc(1.0) → 0.15729920705028513 |
|| min_scale ( numeric ) → integer | Minimum scale (number of fractional decimal digits) needed to represent the supplied value precisely | min_scale(8.4100) → 2 |
Expand Down
18 changes: 18 additions & 0 deletions supports/sqlite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### JSON Functions
https://www.postgresql.org/docs/16/functions-net.html

| Implemented | Function |
|-------------|---------------------|
| ✅︎ | json |
| ✅︎ | json_valid |
| 🚧︎︎ | json_array_length |
| 🚧︎ | json_error_position |
| 🚧︎ | json_extract |
| 🚧︎︎ | json_insert |
| 🚧︎︎ | json_object |
| 🚧︎︎ | json_patch |
| 🚧︎ | json_remove |
| 🚧︎︎ | json_replace |
| 🚧︎ | json_set |
| 🚧︎︎ | json_type |
| 🚧︎︎ | json_quote |

0 comments on commit 7f92edd

Please sign in to comment.