How to access error events -- Is there a best/good practice for error handling
undefined
.
*Example
```typescript...`createTable` function with dynamic column array
Issue Getting TypeScript to work with nested query
How can one make `jsonObjectFrom` respect nullability of underlying subquery?
jsonObjectFrom
helper on a subquery where the base table type of a field is not null, but all fields returned by jsonObjectFrom
are nullable.
We are passing the eb
with the jsonObjectFrom
helper inline in our query and were wondering if there a way to specify that a field will not be null?...Filtering data based on relationship value
jsonObjectFrom
helper which is working perfectly. My question now is how can I filter the final data based on a field present in the relation data. For example if my main table is User and the related data is Account, how can I fetch Users where the account is active
all in the same query? Im already sing the expression builder (eb) for the subquery, do I need to add a separate join expression...How can I write a query that does multiple insertions at once?
How to "generate" or "store" a query result type?
Migrations in transaction and self management
Running a function during migration
SELECT
e.g. :
SELECT create_hypertable('conditions', 'time', 'location', 4);
Since this is part of the table creation, I would like to make sure it happens during migration step. Is there a way to run raw sql as part of a migration?...Updating JSON object value in column
Kysely Geometry Parsing Plugin - Convert driver values to/from geojson
Ad-Hoc select from table not in Kysely types
kysely-codgen
cli, and want to know how one can ad-hoc use the selectFrom
statement from a table not included in the generated types by typing it ourselves as we build the query?Convert JSON array result into JS array
Destroying connection necessary?
how to insert an array of strings
Typescript Error when creating MySQL db pool
Migrate beyond 9 (to `10-...`)
10-passport
but I am always getting this error:
Error: corrupted migrations: expected previously executed migration 2-userguilds to be at index 2 but 10 was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.
Error: corrupted migrations: expected previously executed migration 2-userguilds to be at index 2 but 10 was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.
Transaction response time
createUser(), createProfile(), createBusiness(), and createAddress()
for this example.
Currently, I have creaeUser()
execute on it's own and then the other 3 free functions execute as one transaction. Which gives me the benefit of having a fast response time for when a user creates an account. (the loading screen is quick) but I don't know if that benefit outweighs the risk of having user records in the database without a profile, business, and/or address
records - *if for some reason the transaction fails but the createUser()
executed fine.
...How to handle failed transactions