Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added clearGroupBy() #921

Merged
merged 2 commits into from
Mar 24, 2024
Merged

Added clearGroupBy() #921

merged 2 commits into from
Mar 24, 2024

Conversation

dswbx
Copy link
Contributor

@dswbx dswbx commented Mar 24, 2024

Adds the option to remove group by clause from SelectQueryBuilder using clearGroupBy() (as discussed in https://discord.com/channels/890118421587578920/1073948476590792786/threads/1221117943081996429)

I've only added a single node test, should I add additional ones for other environments?


Unrelated to this PR in particular: I had some issues making tests for mssql work. After following #906 it worked. Maybe we should add this to the Contribution Guidelines? Additionally I've had issues with prettier modifying indentation and tsc complaining about Duplicate identifier 'Prepend' – I had to manually disable lib checks. I'm running on node v20.8.0 and npm 10.1.0

Copy link

vercel bot commented Mar 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2024 0:42am

@koskimas
Copy link
Member

koskimas commented Mar 24, 2024

Thank you!

Additionally I've had issues with prettier modifying indentation

What do you mean by this? That's one of the things it's supposed to do, isn't it?

tsc complaining about Duplicate identifier 'Prepend'

I haven't experienced this one. Can you paste the whole error?

Maybe we should add this to the Contribution Guidelines

Good idea!

@igalklebanov igalklebanov added enhancement New feature or request api Related to library's API labels Mar 24, 2024
@dswbx
Copy link
Contributor Author

dswbx commented Mar 24, 2024

@koskimas regarding the type issue I was referring to, it's a bit embarrassing. Found out that a few directories up, I ran pnpm install and so that's where it came from. After removing it, the type issues are gone – sorry!

Regarding prettier, yes it's supposed to format the code, but it changed indentation within select-query-builder.ts I haven't modified. Here is an example running the prettier command on a clean repo:

$ git reset --hard origin/master
$ npm ci

added 416 packages, and audited 417 packages in 3s

100 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ npm run prettier

> kysely@0.27.3 prettier
> prettier --write 'src/**/*.ts' 'test/**/*.ts'

[...]

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   src/operation-node/output-node.ts
        modified:   src/operation-node/select-query-node.ts
        modified:   src/parser/select-parser.ts
        modified:   src/parser/value-parser.ts
        modified:   src/query-builder/delete-query-builder.ts
        modified:   src/query-builder/insert-query-builder.ts
        modified:   src/query-builder/select-query-builder.ts
        modified:   src/query-builder/update-query-builder.ts
        modified:   src/schema/column-definition-builder.ts
        modified:   src/util/type-utils.ts
        modified:   test/node/src/introspect.test.ts
        modified:   test/node/src/test-setup.ts
        modified:   test/typings/test-d/insert.test-d.ts

no changes added to commit (use "git add" and/or "git commit -a")

$ npm ls prettier
kysely@0.27.3 /Users/dennis/Projects/tmp/repos/kysely
└── prettier@3.2.5
$ git diff src/query-builder/select-query-builder.ts
diff --git a/src/query-builder/select-query-builder.ts b/src/query-builder/select-query-builder.ts
index dcdbe5c7..901db04f 100644
--- a/src/query-builder/select-query-builder.ts
+++ b/src/query-builder/select-query-builder.ts
@@ -2477,12 +2477,12 @@ export type SelectQueryBuilderWithInnerJoin<
     ? InnerJoinedBuilder<DB, TB, O, A, DB[T]>
     : never
   : TE extends keyof DB
-  ? SelectQueryBuilder<DB, TB | TE, O>
-  : TE extends AliasedExpression<infer QO, infer QA>
-  ? InnerJoinedBuilder<DB, TB, O, QA, QO>
-  : TE extends (qb: any) => AliasedExpression<infer QO, infer QA>
-  ? InnerJoinedBuilder<DB, TB, O, QA, QO>
-  : never
+    ? SelectQueryBuilder<DB, TB | TE, O>
+    : TE extends AliasedExpression<infer QO, infer QA>
+      ? InnerJoinedBuilder<DB, TB, O, QA, QO>
+      : TE extends (qb: any) => AliasedExpression<infer QO, infer QA>
+        ? InnerJoinedBuilder<DB, TB, O, QA, QO>
+        : never

[...]

Could be also an issue on my end, like with the typing issue.

@koskimas
Copy link
Member

Oh, yeah. We don't have anything that automatically runs prettier. This happens when we update prettier to a newer version and forget to run prettier for all files. You can either discard those changes or just add them to the PR.

@koskimas koskimas merged commit 0fd4de8 into kysely-org:master Mar 24, 2024
5 checks passed
github-merge-queue bot referenced this pull request in dotkom/monoweb Aug 20, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [kysely](https://togithub.com/kysely-org/kysely) | [`^0.26.3` ->
`^0.27.0`](https://renovatebot.com/diffs/npm/kysely/0.26.3/0.27.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/kysely/0.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/kysely/0.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/kysely/0.26.3/0.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/kysely/0.26.3/0.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>kysely-org/kysely (kysely)</summary>

###
[`v0.27.4`](https://togithub.com/kysely-org/kysely/releases/tag/0.27.4)

[Compare
Source](https://togithub.com/kysely-org/kysely/compare/0.27.3...0.27.4)

Hey 👋

We've reached 100 contributors AND 1,000 pull requests since our last
release! 🍾
Here's all the amazing work done since version 0.27.3...

#### 🚀 Features

- Added `clearGroupBy()` by [@&#8203;dswbx](https://togithub.com/dswbx)
in
[https://github.com/kysely-org/kysely/pull/921](https://togithub.com/kysely-org/kysely/pull/921)
- add `objectStrategy` option that allows to not mutate result
objects/arrays @&#8203; `ParseJSONResultsPlugin`. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/953](https://togithub.com/kysely-org/kysely/pull/953)

##### PostgreSQL 🐘 / SQLite 📘

- Support table names in UpdateQueryBuilder.returningAll by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@f63327e

##### MySQL 🐬 / MS SQL Server 🥅

- add varbinary data type for mysql by
[@&#8203;jonasbovyn](https://togithub.com/jonasbovyn) in
[https://github.com/kysely-org/kysely/pull/812](https://togithub.com/kysely-org/kysely/pull/812)

##### PostgreSQL 🐘

- feat: add 'add column if not exists' for postgres by
[@&#8203;MarkusWendorf](https://togithub.com/MarkusWendorf) in
[https://github.com/kysely-org/kysely/pull/900](https://togithub.com/kysely-org/kysely/pull/900)
- feat: add '?|' comparison operator by
[@&#8203;alenap93](https://togithub.com/alenap93) in
[https://github.com/kysely-org/kysely/pull/1006](https://togithub.com/kysely-org/kysely/pull/1006)
- feat: add the starts-with postgres comparison operator by
[@&#8203;boehs](https://togithub.com/boehs) in
[https://github.com/kysely-org/kysely/pull/1029](https://togithub.com/kysely-org/kysely/pull/1029)
- postgres introspection getTables handle partition tables as well. by
[@&#8203;HeikoOsigus](https://togithub.com/HeikoOsigus) in
[https://github.com/kysely-org/kysely/pull/1034](https://togithub.com/kysely-org/kysely/pull/1034)

##### MS SQL Server 🥅

- add `OUTPUT` clause support. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/828](https://togithub.com/kysely-org/kysely/pull/828)

#### 🐞 Bugfixes

- move `preventAwait` to `alter-column-builder`.ts. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1031](https://togithub.com/kysely-org/kysely/pull/1031)
- fixes The type of `eb` in `selectFrom(eb => ...)` is wrong by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@873671b
- fixes QueryCompilerError: Could not serialize value causes Kysely
instance to fail later by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@a65a7f3
- fixes CamelCasePlugin messes up complex type mappings with
setTypeParser by [@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@d45a8fa

##### PostgreSQL 🐘 / MS SQL Server 🥅

- Updating visitMergeQuery to join `WhenNode`s with a space by
[@&#8203;gittgott](https://togithub.com/gittgott) in
[https://github.com/kysely-org/kysely/pull/940](https://togithub.com/kysely-org/kysely/pull/940)
- fix merge queries not being transformed. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/955](https://togithub.com/kysely-org/kysely/pull/955)
- fix `InferResult` not working for merge queries. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/902](https://togithub.com/kysely-org/kysely/pull/902)

##### PostgreSQL 🐘

- Fix typo on timetz regex by
[@&#8203;dunkelbraun](https://togithub.com/dunkelbraun) in
[https://github.com/kysely-org/kysely/pull/911](https://togithub.com/kysely-org/kysely/pull/911)

##### MS SQL Server 🥅

- fix `MssqlDialect` streaming not handling backpressure. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1041](https://togithub.com/kysely-org/kysely/pull/1041)
- fix Tedious v18 includes different TypeScript annotations by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1041](https://togithub.com/kysely-org/kysely/pull/1041)
- handle connection errors @&#8203; `MssqlDriver`. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1042](https://togithub.com/kysely-org/kysely/pull/1042)

#### 📖 Documentation

- fix complex join example by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@9f836c4
- fix complex join example some more by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@8f9038f
- fix complex insert example by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@ead3489
- improve subquery insert example by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@0e194b0
- add not null assertion site example by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@58ba4ae
- fix a bunch of untyped sql snippets in API doc examples by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@64a56f9
- make it even more clear that table interfaces are not row types by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@9485b44
- update outdated intro in kysely.dev by
[@&#8203;koskimas](https://togithub.com/koskimas) in
kysely-org/kysely@e84863d
- remove snyk badge. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
kysely-org/kysely@4326a91
- add CTE examples to site by
[@&#8203;koskimas](https://togithub.com/koskimas) in
https://github.com/kysely-org/kysely/commit/d9a53cd1441e0854456e930eb628f5b03a34db93\\
- fix SQLite import @&#8203; getting started. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/927](https://togithub.com/kysely-org/kysely/pull/927)
- capitalization, more environments @&#8203; README. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
kysely-org/kysely@6ab2155
- fixed docs for deno by [@&#8203;kolay-v](https://togithub.com/kolay-v)
in
[https://github.com/kysely-org/kysely/pull/938](https://togithub.com/kysely-org/kysely/pull/938)
- Added MySQL and MariaDB support information for relation recipes by
[@&#8203;chriswep](https://togithub.com/chriswep) in
[https://github.com/kysely-org/kysely/pull/800](https://togithub.com/kysely-org/kysely/pull/800)
- Fix spelling, punctuation, grammar by
[@&#8203;DePasqualeOrg](https://togithub.com/DePasqualeOrg) in
[https://github.com/kysely-org/kysely/pull/969](https://togithub.com/kysely-org/kysely/pull/969)
- Fix typo (it's --> its) by
[@&#8203;davidalber](https://togithub.com/davidalber) in
[https://github.com/kysely-org/kysely/pull/1000](https://togithub.com/kysely-org/kysely/pull/1000)
- add logging documentation page by
[@&#8203;JeromeBu](https://togithub.com/JeromeBu) in
[https://github.com/kysely-org/kysely/pull/1003](https://togithub.com/kysely-org/kysely/pull/1003)
- Docs now reflect `tedious` support in `Bun` by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1018](https://togithub.com/kysely-org/kysely/pull/1018)
- Docs: Fix typo by [@&#8203;devgru](https://togithub.com/devgru) in
[https://github.com/kysely-org/kysely/pull/1025](https://togithub.com/kysely-org/kysely/pull/1025)
- mention `kysely-ctl` in migrations section. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1035](https://togithub.com/kysely-org/kysely/pull/1035)
- docs: add comments for `UpdateResult` by
[@&#8203;movahhedi](https://togithub.com/movahhedi) in
[https://github.com/kysely-org/kysely/pull/993](https://togithub.com/kysely-org/kysely/pull/993)
- fix mssql createPerson example. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1048](https://togithub.com/kysely-org/kysely/pull/1048)
- docs: fix values example not compiling. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1058](https://togithub.com/kysely-org/kysely/pull/1058)
- fix typo incorrect by [@&#8203;zce](https://togithub.com/zce) in
[https://github.com/kysely-org/kysely/pull/1068](https://togithub.com/kysely-org/kysely/pull/1068)

#### 📦 CICD & Tooling

- migrate to docker compose v2. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/932](https://togithub.com/kysely-org/kysely/pull/932)
- ci: bumping actions and runtimes. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/942](https://togithub.com/kysely-org/kysely/pull/942)
- ci: drop node16 tests as it reached EOL. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
kysely-org/kysely@873ed5a
- remove docker-compose file version. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/966](https://togithub.com/kysely-org/kysely/pull/966)
- add node22 @&#8203; tests. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/964](https://togithub.com/kysely-org/kysely/pull/964)
- export all operation nodes, forever. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/972](https://togithub.com/kysely-org/kysely/pull/972)
- ci: bump bun, test mssql in bun. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1022](https://togithub.com/kysely-org/kysely/pull/1022)
- ci: install only chromium by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1043](https://togithub.com/kysely-org/kysely/pull/1043)
- bump TypeScript to v5.5. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/965](https://togithub.com/kysely-org/kysely/pull/965)
- docs: bump docusaurus to v3. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1050](https://togithub.com/kysely-org/kysely/pull/1050)
- docs: remove remaining react imports. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/1057](https://togithub.com/kysely-org/kysely/pull/1057)
- ci: split jobs. by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) in
[https://github.com/kysely-org/kysely/pull/943](https://togithub.com/kysely-org/kysely/pull/943)

#### ⚠️ Breaking Changes

#### 🐤 New Contributors

- [@&#8203;dunkelbraun](https://togithub.com/dunkelbraun) made their
first contribution in
[https://github.com/kysely-org/kysely/pull/911](https://togithub.com/kysely-org/kysely/pull/911)
- [@&#8203;dswbx](https://togithub.com/dswbx) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/921](https://togithub.com/kysely-org/kysely/pull/921)
- [@&#8203;kolay-v](https://togithub.com/kolay-v) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/938](https://togithub.com/kysely-org/kysely/pull/938)
- [@&#8203;chriswep](https://togithub.com/chriswep) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/800](https://togithub.com/kysely-org/kysely/pull/800)
- [@&#8203;jonasbovyn](https://togithub.com/jonasbovyn) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/812](https://togithub.com/kysely-org/kysely/pull/812)
- [@&#8203;DePasqualeOrg](https://togithub.com/DePasqualeOrg) made their
first contribution in
[https://github.com/kysely-org/kysely/pull/969](https://togithub.com/kysely-org/kysely/pull/969)
- [@&#8203;davidalber](https://togithub.com/davidalber) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/1000](https://togithub.com/kysely-org/kysely/pull/1000)
- [@&#8203;JeromeBu](https://togithub.com/JeromeBu) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/1003](https://togithub.com/kysely-org/kysely/pull/1003)
- [@&#8203;alenap93](https://togithub.com/alenap93) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/1006](https://togithub.com/kysely-org/kysely/pull/1006)
- [@&#8203;devgru](https://togithub.com/devgru) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/1025](https://togithub.com/kysely-org/kysely/pull/1025)
- [@&#8203;boehs](https://togithub.com/boehs) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/1029](https://togithub.com/kysely-org/kysely/pull/1029)
- [@&#8203;HeikoOsigus](https://togithub.com/HeikoOsigus) made their
first contribution in
[https://github.com/kysely-org/kysely/pull/1034](https://togithub.com/kysely-org/kysely/pull/1034)
- [@&#8203;movahhedi](https://togithub.com/movahhedi) made their first
contribution in
[https://github.com/kysely-org/kysely/pull/993](https://togithub.com/kysely-org/kysely/pull/993)
- [@&#8203;zce](https://togithub.com/zce) made their first contribution
in
[https://github.com/kysely-org/kysely/pull/1068](https://togithub.com/kysely-org/kysely/pull/1068)

**Full Changelog**:
kysely-org/kysely@0.27.3...0.27.4

###
[`v0.27.3`](https://togithub.com/kysely-org/kysely/compare/0.27.2...0.27.3)

[Compare
Source](https://togithub.com/kysely-org/kysely/compare/0.27.2...0.27.3)

###
[`v0.27.2`](https://togithub.com/kysely-org/kysely/releases/tag/0.27.2)

[Compare
Source](https://togithub.com/kysely-org/kysely/compare/0.27.1...0.27.2)

- Add `allowUnorderedMigrations` option for the migrator.
[#&#8203;723](https://togithub.com/kysely-org/kysely/issues/723) Awesome
work by [@&#8203;tracehelms](https://togithub.com/tracehelms) ❤️
-   Fix update and insert query type issues when using `Kysely<any>`.
- Improve error messages when passing a wrong column name or wrong type
for a column in `UpdateQueryBuilder#set` and `InsertQueryBuilder#values`
methods.

###
[`v0.27.1`](https://togithub.com/kysely-org/kysely/releases/tag/0.27.1)

[Compare
Source](https://togithub.com/kysely-org/kysely/compare/0.27.0...0.27.1)

- [Add `$notNull` type
helper](https://togithub.com/kysely-org/kysely/commit/ad194e1aa15e014d0aea3009039b8caa6ef92767)
- Support `for update of table` and friends
[#&#8203;683](https://togithub.com/kysely-org/kysely/issues/683)
- Support `insert into "person" default values`
[#&#8203;685](https://togithub.com/kysely-org/kysely/issues/685)
-   Support arbitrary expressions in `limit` and `offset`
- Support insert, update and delete queries in raw SQL substitutions
[#&#8203;680](https://togithub.com/kysely-org/kysely/issues/680)
- Fix node 14 regression
[#&#8203;824](https://togithub.com/kysely-org/kysely/issues/824)
- Fix `fn.agg` regression where two type arguments were required
[#&#8203;829](https://togithub.com/kysely-org/kysely/issues/829)

###
[`v0.27.0`](https://togithub.com/kysely-org/kysely/releases/tag/0.27.0)

[Compare
Source](https://togithub.com/kysely-org/kysely/compare/0.26.3...0.27.0)

- Add mssql dialect. A huge effort by
[@&#8203;igalklebanov](https://togithub.com/igalklebanov) ❤️
[#&#8203;595](https://togithub.com/kysely-org/kysely/issues/595)
-   Add postgres `json_agg` and `to_json` functions to function module
- Add `is distinct from` operator
[#&#8203;673](https://togithub.com/kysely-org/kysely/issues/673)
- Add `set('first_name', 'Jennifer')` variant for update query's `set`
method [#&#8203;672](https://togithub.com/kysely-org/kysely/issues/672)
- Add `as` statement support for createTable
[#&#8203;771](https://togithub.com/kysely-org/kysely/issues/771). Thank
you [@&#8203;viraxslot](https://togithub.com/viraxslot) ❤️
- Add `nulls not distinct` option for constraints
[#&#8203;770](https://togithub.com/kysely-org/kysely/issues/770). Thank
you [@&#8203;viraxslot](https://togithub.com/viraxslot) ❤️
- Add `addIndex` & `dropIndex` @&#8203; AlterTableBuilder
[#&#8203;720](https://togithub.com/kysely-org/kysely/issues/720). Thank
you [@&#8203;Gaspero](https://togithub.com/Gaspero)
- Add `stream()` support for sqlite dialect
[#&#8203;754](https://togithub.com/kysely-org/kysely/issues/754). Thank
you [@&#8203;tgriesser](https://togithub.com/tgriesser) ❤️
- Fix query and error logging both occur on error.
[#&#8203;796](https://togithub.com/kysely-org/kysely/issues/796). Thank
you [@&#8203;igalklebanov](https://togithub.com/igalklebanov) ❤️
- Fix type issue with `$if`
[#&#8203;793](https://togithub.com/kysely-org/kysely/issues/793). Thank
you [@&#8203;igalklebanov](https://togithub.com/igalklebanov) ❤️
- Fix issue where `onConflict..doUpdateSet` used select types instead of
update types.
[#&#8203;792](https://togithub.com/kysely-org/kysely/issues/792). Thank
you [@&#8203;igalklebanov](https://togithub.com/igalklebanov) ❤️
- Add `eb.jsonPath<$>`
[#&#8203;791](https://togithub.com/kysely-org/kysely/issues/791). Thank
you [@&#8203;igalklebanov](https://togithub.com/igalklebanov) ❤️
- `$narrowType` [supports new type tag
`NotNull`](https://togithub.com/kysely-org/kysely/commit/ad3ee2b0fdb5ed2c55635b1e03b7b09406f12e6b)
for an easier way to mark columns not nullable manually
-   Fix [#&#8203;811](https://togithub.com/kysely-org/kysely/issues/811)
- Support arbitrary expressions in `min` and `max` aggregate functions.

##### Breaking changes

- `selectNoFrom` is removed from `ExpressionBuilder` due to severe
typescript performance issues. `selectNoFrom` still exists in the
`Kysely` instance, and in most cases, you can use that instead. See this
example on how to migrate:
https://kyse.link/?p=s\&i=sqAZIvTQktxgXYzHGkqX.
- Types are once again a little bit stricter in some places. You might
get type errors from code like ``where('first_name', '=',
sql`something`)``. You need to explicitly give a type for the `sql`
expressions like this `` sql<string>`something` ``
- Deprecated functions `eb.cmpr` and `eb.bxp` have been removed. Use
`eb` as a function instead.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/dotkom/monoweb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
thecodrr pushed a commit to thecodrr/kysely that referenced this pull request Sep 3, 2024
* added clearGroupBy

* fix clearGroupBy comment by adding a groupBy to be cleared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants