Skip to content

Commit 06625a1

Browse files
authored
Update README.md
1 parent 803a814 commit 06625a1

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,30 @@ LOAD chsql;
1919
```
2020

2121
If you previously installed the `chsql` extension, upgrade using the FORCE command
22-
```
22+
```sql
2323
FORCE INSTALL chsql FROM community;
24+
LOAD chsql;
2425
```
2526

27+
## Supported Functions
2628

27-
## Usage Examples
28-
```sql
29-
-- Type conversion
30-
SELECT toInt32(123456789) as int32;
31-
SELECT toUInt64(1234567890123) as uint64;
32-
33-
-- Default values
34-
SELECT toInt64OrZero('abc') as int64_or_zero;
35-
SELECT toFloatOrNull('abc') as float_or_null;
29+
The [list of supported functions](https://community-extensions.duckdb.org/extensions/chsql.html#added-functions) is available on the [dedicated extension page](https://community-extensions.duckdb.org/extensions/chsql.html).
3630

37-
-- Arithmetic
38-
SELECT intDiv(10, 3) as int_div;
31+
## Usage Examples
32+
Once installed, macro functions provided by the extension can be used just like built-in functions.
3933

40-
-- String matching
41-
SELECT match('hello world', '%world%') as match_result;
34+
```sql
35+
D INSTALL chsql FROM community;
36+
D LOAD chsql;
37+
D SELECT IPv4StringToNum('127.0.0.1'), IPv4NumToString(2130706433);
38+
┌──────────────────────────────┬─────────────────────────────┐
39+
│ ipv4stringtonum('127.0.0.1') │ ipv4numtostring(2130706433) │
40+
│ int32 │ varchar
41+
├──────────────────────────────┼─────────────────────────────┤
42+
2130706433127.0.0.1
43+
└──────────────────────────────┴─────────────────────────────┘
4244
```
4345

44-
Find a [full list of supported functions](https://community-extensions.duckdb.org/extensions/chsql.html#added-functions) on the [extension page](https://community-extensions.duckdb.org/extensions/chsql.html).
4546

4647
<br>
4748

0 commit comments

Comments
 (0)