Skip to content

Commit bdc9d5c

Browse files
committed
feat: add pre run scripts
1 parent 02926e0 commit bdc9d5c

28 files changed

+4378
-4009
lines changed

js/packages/proto/src/generated/quary/service/v1/connection_config.ts

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/packages/quary-extension-ui/src/views/OnboardingView.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ const DatabaseSelection: React.FC<{
267267
sqliteInMemory: {},
268268
},
269269
vars: [],
270+
preRunScripts: [],
270271
})
271272
break
272273
}
@@ -329,6 +330,7 @@ const ConfigurationDetails: React.FC<ConfigurationDetailsProps> = ({
329330
},
330331
},
331332
vars: [],
333+
preRunScripts: [],
332334
}
333335
case DatabaseOnboardingOptions.SQLite:
334336
return {
@@ -339,6 +341,7 @@ const ConfigurationDetails: React.FC<ConfigurationDetailsProps> = ({
339341
},
340342
},
341343
vars: [],
344+
preRunScripts: [],
342345
}
343346
case DatabaseOnboardingOptions.Snowflake:
344347
return {
@@ -351,6 +354,7 @@ const ConfigurationDetails: React.FC<ConfigurationDetailsProps> = ({
351354
},
352355
},
353356
vars: [],
357+
preRunScripts: [],
354358
}
355359
default: {
356360
throw new Error(`invalid database type ${states.sourceDetails.type}`)

proto/gen/es/quary/service/v1/connection_config_pb.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ export class ConnectionConfig extends Message<ConnectionConfig> {
119119
*/
120120
vars: Var[] = [];
121121

122+
/**
123+
* pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for
124+
* setting up the database for the run job. For example creating UDFs or installing plugins ...
125+
* The scripts are run in order and should be idempotent.
126+
* The list points to the location of the script in the project.
127+
*
128+
* @generated from field: repeated string pre_run_scripts = 11;
129+
*/
130+
preRunScripts: string[] = [];
131+
122132
constructor(data?: PartialMessage<ConnectionConfig>) {
123133
super();
124134
proto3.util.initPartial(data, this);
@@ -137,6 +147,7 @@ export class ConnectionConfig extends Message<ConnectionConfig> {
137147
{ no: 9, name: "redshift", kind: "message", T: ConnectionConfig_ConnectionConfigRedshift, oneof: "config" },
138148
{ no: 10, name: "clickhouse", kind: "message", T: ConnectionConfig_ConnectionConfigClickHouse, oneof: "config" },
139149
{ no: 8, name: "vars", kind: "message", T: Var, repeated: true },
150+
{ no: 11, name: "pre_run_scripts", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
140151
]);
141152

142153
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ConnectionConfig {

proto/gen/json_schema/ConnectionConfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
},
4747
"additionalProperties": false,
4848
"type": "array"
49+
},
50+
"pre_run_scripts": {
51+
"items": {
52+
"type": "string"
53+
},
54+
"type": "array",
55+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
4956
}
5057
},
5158
"additionalProperties": false,

proto/gen/json_schema/GenerateProjectFilesRequest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
},
5858
"additionalProperties": false,
5959
"type": "array"
60+
},
61+
"pre_run_scripts": {
62+
"items": {
63+
"type": "string"
64+
},
65+
"type": "array",
66+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
6067
}
6168
},
6269
"additionalProperties": false,

proto/gen/json_schema/GetProjectConfigResponse.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
},
5858
"additionalProperties": false,
5959
"type": "array"
60+
},
61+
"pre_run_scripts": {
62+
"items": {
63+
"type": "string"
64+
},
65+
"type": "array",
66+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
6067
}
6168
},
6269
"additionalProperties": false,

proto/gen/json_schema/ParseProjectResponse.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@
135135
},
136136
"additionalProperties": false,
137137
"type": "array"
138+
},
139+
"pre_run_scripts": {
140+
"items": {
141+
"type": "string"
142+
},
143+
"type": "array",
144+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
138145
}
139146
},
140147
"additionalProperties": false,

proto/gen/json_schema/Project.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@
191191
},
192192
"additionalProperties": false,
193193
"type": "array"
194+
},
195+
"pre_run_scripts": {
196+
"items": {
197+
"type": "string"
198+
},
199+
"type": "array",
200+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
194201
}
195202
},
196203
"additionalProperties": false,

proto/gen/json_schema/ReturnSQLForSeedsAndModelsResponse.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@
141141
},
142142
"additionalProperties": false,
143143
"type": "array"
144+
},
145+
"pre_run_scripts": {
146+
"items": {
147+
"type": "string"
148+
},
149+
"type": "array",
150+
"description": "pre_run_scripts is a list of scripts that should be run before a run job against the database. This is useful for setting up the database for the run job. For example creating UDFs or installing plugins ... The scripts are run in order and should be idempotent. The list points to the location of the script in the project."
144151
}
145152
},
146153
"additionalProperties": false,

0 commit comments

Comments
 (0)