Skip to content

Commit

Permalink
format md
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasavila00 committed Jun 29, 2022
1 parent b87229f commit 31974c0
Show file tree
Hide file tree
Showing 12 changed files with 642 additions and 181 deletions.
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

16 changes: 8 additions & 8 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Build

- [ ] copy from fp-ts
- [ ] copy from fp-ts

# DOCS

- [ ] document clickhouse extensions
- [ ] document clickhouse extensions

- [ ] cte examples
- [ ] cte examples

- [ ] easy extension sql safe string, example boolean in CH
- [ ] easy extension sql safe string, example boolean in CH

# Global

- [ ] CI specify node version
- [ ] CI specify node version

- [ ] check TODO
- [ ] check TODO

- [ ] istanbul ignore, can some be removed?
- [ ] istanbul ignore, can some be removed?

- [ ] eslint (no console, no skip)
- [ ] eslint (no console, no skip)
146 changes: 129 additions & 17 deletions docs/api/classes/compound.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ nav_order: 1
parent: Classes
layout: default
grand_parent: Api

---

## compound overview
Expand All @@ -28,12 +27,12 @@ export declare class Compound<Scope, Selection> {
private constructor(
/* @internal */
public __props: {
content: TableOrSubquery<any, any, any, any>[]
qualifier: 'UNION' | 'UNION ALL' | 'INTERSECT' | 'EXCEPT'
orderBy: SafeString[]
limit: SafeString | number | null
content: TableOrSubquery<any, any, any, any>[];
qualifier: "UNION" | "UNION ALL" | "INTERSECT" | "EXCEPT";
orderBy: SafeString[];
limit: SafeString | number | null;
}
)
);
}
```

Expand All @@ -44,7 +43,11 @@ Added in v0.0.0
**Signature**

```ts
orderBy: (f: (fields: Record<Scope | Selection, SafeString>) => SafeString[] | SafeString) => Compound<Scope, Selection>
orderBy: (
f: (
fields: Record<Scope | Selection, SafeString>
) => SafeString[] | SafeString
) => Compound<Scope, Selection>;
```

Added in v0.0.0
Expand All @@ -54,7 +57,7 @@ Added in v0.0.0
**Signature**

```ts
limit: (limit: SafeString | number) => Compound<Scope, Selection>
limit: (limit: SafeString | number) => Compound<Scope, Selection>;
```

Added in v0.0.0
Expand All @@ -64,7 +67,12 @@ Added in v0.0.0
**Signature**

```ts
select: <NewSelection extends string>(f: (fields: Record<Selection | `main_alias.${Selection}`, SafeString> & NoSelectFieldsCompileError) => Record<NewSelection, SafeString>) => SelectStatement<Selection | `main_alias.${Selection}`, NewSelection>
select: <NewSelection extends string>(
f: (
fields: Record<Selection | `main_alias.${Selection}`, SafeString> &
NoSelectFieldsCompileError
) => Record<NewSelection, SafeString>
) => SelectStatement<Selection | `main_alias.${Selection}`, NewSelection>;
```
Added in v0.0.0
Expand All @@ -74,7 +82,7 @@ Added in v0.0.0
**Signature**
```ts
selectStar: () => SelectStatement<Selection, Selection>
selectStar: () => SelectStatement<Selection, Selection>;
```
Added in v0.0.0
Expand All @@ -84,7 +92,24 @@ Added in v0.0.0
**Signature**
```ts
joinTable: <Alias1 extends string, Selection2 extends string, Alias2 extends string>(thisCompoundAlias: Alias1, operator: string, table: Table<Selection2, Alias2>) => JoinedFactory<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias1}.${Selection}` | `${Alias2}.${Selection2}`, Alias1 | Alias2, Extract<Selection2, Selection>, Extract<Selection2, Selection>>
joinTable: <
Alias1 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisCompoundAlias: Alias1,
operator: string,
table: Table<Selection2, Alias2>
) =>
JoinedFactory<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias1}.${Selection}`
| `${Alias2}.${Selection2}`,
Alias1 | Alias2,
Extract<Selection2, Selection>,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -94,7 +119,22 @@ Added in v0.0.0
**Signature**
```ts
commaJoinTable: <Alias1 extends string, Selection2 extends string, Alias2 extends string>(thisSelectAlias: Alias1, table: Table<Selection2, Alias2>) => Joined<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias1}.${Selection}` | `${Alias2}.${Selection2}`, Alias1 | Alias2, Extract<Selection2, Selection>>
commaJoinTable: <
Alias1 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisSelectAlias: Alias1,
table: Table<Selection2, Alias2>
) =>
Joined<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias1}.${Selection}`
| `${Alias2}.${Selection2}`,
Alias1 | Alias2,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -104,7 +144,26 @@ Added in v0.0.0
**Signature**
```ts
joinSelect: <Alias1 extends string, Scope2 extends string, Selection2 extends string, Alias2 extends string>(thisCompoundAlias: Alias1, operator: string, selectAlias: Alias2, select: SelectStatement<Scope2, Selection2>) => JoinedFactory<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias2}.${Selection2}` | `${Alias1}.${Selection}`, Alias1 | Alias2, Extract<Selection2, Selection>, Extract<Selection2, Selection>>
joinSelect: <
Alias1 extends string,
Scope2 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisCompoundAlias: Alias1,
operator: string,
selectAlias: Alias2,
select: SelectStatement<Scope2, Selection2>
) =>
JoinedFactory<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias2}.${Selection2}`
| `${Alias1}.${Selection}`,
Alias1 | Alias2,
Extract<Selection2, Selection>,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -114,7 +173,24 @@ Added in v0.0.0
**Signature**
```ts
commaJoinSelect: <Alias1 extends string, Scope2 extends string, Selection2 extends string, Alias2 extends string>(thisCompoundAlias: Alias1, selectAlias: Alias2, select: SelectStatement<Scope2, Selection2>) => Joined<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias2}.${Selection2}` | `${Alias1}.${Selection}`, Alias1 | Alias2, Extract<Selection2, Selection>>
commaJoinSelect: <
Alias1 extends string,
Scope2 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisCompoundAlias: Alias1,
selectAlias: Alias2,
select: SelectStatement<Scope2, Selection2>
) =>
Joined<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias2}.${Selection2}`
| `${Alias1}.${Selection}`,
Alias1 | Alias2,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -124,7 +200,26 @@ Added in v0.0.0
**Signature**
```ts
joinCompound: <Alias1 extends string, Scope2 extends string, Selection2 extends string, Alias2 extends string>(thisCompoundAlias: Alias1, operator: string, compoundAlias: Alias2, compound: Compound<Scope2, Selection2>) => JoinedFactory<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias2}.${Selection2}` | `${Alias1}.${Selection}`, Alias1 | Alias2, Extract<Selection2, Selection>, Extract<Selection2, Selection>>
joinCompound: <
Alias1 extends string,
Scope2 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisCompoundAlias: Alias1,
operator: string,
compoundAlias: Alias2,
compound: Compound<Scope2, Selection2>
) =>
JoinedFactory<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias2}.${Selection2}`
| `${Alias1}.${Selection}`,
Alias1 | Alias2,
Extract<Selection2, Selection>,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -134,7 +229,24 @@ Added in v0.0.0
**Signature**
```ts
commaJoinCompound: <Alias1 extends string, Scope2 extends string, Selection2 extends string, Alias2 extends string>(thisCompoundAlias: Alias1, compoundAlias: Alias2, compound: Compound<Scope2, Selection2>) => Joined<Exclude<Selection, Selection2> | Exclude<Selection2, Selection> | `${Alias2}.${Selection2}` | `${Alias1}.${Selection}`, Alias1 | Alias2, Extract<Selection2, Selection>>
commaJoinCompound: <
Alias1 extends string,
Scope2 extends string,
Selection2 extends string,
Alias2 extends string
>(
thisCompoundAlias: Alias1,
compoundAlias: Alias2,
compound: Compound<Scope2, Selection2>
) =>
Joined<
| Exclude<Selection, Selection2>
| Exclude<Selection2, Selection>
| `${Alias2}.${Selection2}`
| `${Alias1}.${Selection}`,
Alias1 | Alias2,
Extract<Selection2, Selection>
>;
```
Added in v0.0.0
Expand All @@ -144,7 +256,7 @@ Added in v0.0.0
**Signature**
```ts
stringify: () => string
stringify: () => string;
```
Added in v0.0.0
16 changes: 10 additions & 6 deletions docs/api/classes/cte.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ nav_order: 2
parent: Classes
layout: default
grand_parent: Api

---

## cte overview
Expand All @@ -22,11 +21,11 @@ export declare class CommonTableExpression<Selection, Alias> {
private constructor(
/* @internal */
public __props: {
columns: string[]
alias: string
select: SelectStatement<any, any>
columns: string[];
alias: string;
select: SelectStatement<any, any>;
}
)
);
}
```

Expand All @@ -37,7 +36,12 @@ Added in v0.0.0
**Signature**

```ts
select: <NewSelection extends string>(f: (f: Record<Selection | `${Alias}.${Selection}`, SafeString> & NoSelectFieldsCompileError) => Record<NewSelection, SafeString>) => SelectStatement<Selection | `${Alias}.${Selection}`, NewSelection>
select: <NewSelection extends string>(
f: (
f: Record<Selection | `${Alias}.${Selection}`, SafeString> &
NoSelectFieldsCompileError
) => Record<NewSelection, SafeString>
) => SelectStatement<Selection | `${Alias}.${Selection}`, NewSelection>;
```
Added in v0.0.0
Loading

0 comments on commit 31974c0

Please sign in to comment.