77 Kysely ,
88 ReturningNode ,
99 SelectionNode ,
10+ SelectQueryNode ,
1011 SingleConnectionProvider ,
1112 UpdateQueryNode ,
1213 WhereNode ,
@@ -17,7 +18,6 @@ import {
1718 type QueryCompiler ,
1819 type QueryResult ,
1920 type RootOperationNode ,
20- type SelectQueryNode ,
2121 type TableNode ,
2222} from 'kysely' ;
2323import { nanoid } from 'nanoid' ;
@@ -61,6 +61,15 @@ export class ZenStackQueryExecutor<
6161 return this . client . $options ;
6262 }
6363
64+ private isCrudQueryNode ( node : RootOperationNode ) {
65+ return (
66+ SelectQueryNode . is ( node ) ||
67+ InsertQueryNode . is ( node ) ||
68+ UpdateQueryNode . is ( node ) ||
69+ DeleteQueryNode . is ( node )
70+ ) ;
71+ }
72+
6473 override async executeQuery (
6574 compiledQuery : CompiledQuery ,
6675 queryId : QueryId
@@ -111,7 +120,6 @@ export class ZenStackQueryExecutor<
111120 mutationInterceptionInfo
112121 ) ;
113122
114- // trim the result to the original query node
115123 if ( oldQueryNode !== queryNode ) {
116124 // TODO: trim the result to the original query node
117125 }
@@ -162,9 +170,7 @@ export class ZenStackQueryExecutor<
162170 private proceedQuery ( query : RootOperationNode , queryId : QueryId ) {
163171 // run built-in transformers
164172 const finalQuery = this . nameMapper . transformNode ( query ) ;
165-
166173 const compiled = this . compileQuery ( finalQuery ) ;
167-
168174 return this . driver . txConnection
169175 ? super
170176 . withConnectionProvider (
@@ -415,7 +421,6 @@ export class ZenStackQueryExecutor<
415421 }
416422
417423 plugin . afterEntityMutation ( {
418- // context: this.queryContext,
419424 model : this . getMutationModel ( queryNode ) ,
420425 action : mutationInterceptionInfo . action ,
421426 queryNode,
0 commit comments