ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
217 stars 26 forks source link

Expose `parseColumnType` function #316

Closed slvrtrn closed 3 weeks ago

slvrtrn commented 4 weeks ago

Summary

Extracted and exported the parseColumnType method from the #257 branch. Related to #273. This is useful not only for RowBinary/Native protocols but also for TS interface codegens, so it is probably worth adding it right away.

For example:

Currently supported types to parse:

Currently, not supported (will throw):

Please take a look at the tests for more examples. The tests are not fully complete, so this will be somewhat "experimental" still.

Checklist

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
27 New issues
0 Accepted issues

Measures
0 Security Hotspots
91.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud