Skip to content

Commit

Permalink
update readme and export in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-kadhe committed Mar 25, 2024
1 parent e9d3579 commit 646f36c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ To start using ClickHouse-Schema in your projects, follow these steps:
``` typescript
import { CHString, CHUUID, type InferClickhouseSchemaType } from '@clickhouse-schema'
//Use types directly or import ClickhouseTypes object to get all the types in one place
const myTable = new ClickhouseSchema({
id: { type: CHUUID },
name: { type: CHString }
Expand All @@ -83,7 +84,7 @@ To start using ClickHouse-Schema in your projects, follow these steps:
3. **Utilize Schema Methods**
ClickHouse-Schema provides several methods to streamline working with your database schema:
- Use `<your_schema>.GetCreateTableQuery()` to generate the SQL `CREATE TABLE` query.
- Use `<your_schema>.GetCreateTableQuery()` or `<your_schema>.toString()` to generate the SQL `CREATE TABLE` query.
- Use `<your_schema>.GetOptions()` to access the options passed when creating the table schema.
- Use `<your_schema>.GetCreateTableQueryAsList()` to get the `CREATE TABLE` query as a list of strings, which can be helpful for debugging or logging.
Expand All @@ -99,5 +100,6 @@ To start using ClickHouse-Schema in your projects, follow these steps:
- UUID: `UUID` type
- Arrays: `Array` type
- Nullable: `Nullable` type
- LowCardinality: `LowCardinality` and `Enum` types
And support for more types is coming!
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { ClickhouseSchema } from '@clickhouse-schema-core/clickhouse_schema'
export { ClickhouseTypes } from '@clickhouse-schema-data-types/index'
export type { InferClickhouseSchemaType } from '@clickhouse-schema-core/infer_schema_type'
export {
CHJSON, CHFloat32, CHFloat64,
CHJSON, CHFloat32, CHFloat64, CHDecimal,
CHBoolean, CHUUID, CHArray, CHDate,
CHDate32, CHDateTime, CHDateTime64,
CHEnum, CHFixedString, CHInt16, CHInt8,
Expand Down

1 comment on commit 646f36c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 100% 197/197
🟢 Branches 100% 25/25
🟢 Functions 100% 70/70
🟢 Lines 100% 177/177

Test suite run success

22 tests passing in 2 suites.

Report generated by 🧪jest coverage report action from 646f36c

Please sign in to comment.