You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am trying to create a dynamic transaction entry generator. Bear with me please.
A third party tool my company uses exports data in a JSON format.
I am trying to go through this JSON and create an array of transaction operations.
Something like:
functiongenerateTransactions(jsonData){consttransactions=jsonData.map((entry)=>{consttable=entry.identityName;constrecord=sanitizeData(entry)return{insert: {
table,
record
}}})}
This example is simplified, I will have to make updates as well in case the ID already exists in the DB.
There is another use case in the project as well where I have a debouncer on a set of form inputs that process a dynamic set of transaction operations after the timer runs out to avoid constantly updating the DB as the user types.
Describe the solution you'd like
I'd like to be able to have proper types for my dynamic function based on the types that Xata already has on the client package.
Is it possible to expose the following types?
TransactionOperation
InsertTransactionOperation
UpdateTransactionOperation
DeleteTransactionOperation
Describe alternatives you've considered
In some parts of the project I am pretty much duplicating those and using specific record types:
Is your feature request related to a problem? Please describe.
I am trying to create a dynamic transaction entry generator. Bear with me please.
A third party tool my company uses exports data in a JSON format.
I am trying to go through this JSON and create an array of transaction operations.
Something like:
This example is simplified, I will have to make updates as well in case the ID already exists in the DB.
There is another use case in the project as well where I have a debouncer on a set of form inputs that process a dynamic set of transaction operations after the timer runs out to avoid constantly updating the DB as the user types.
Describe the solution you'd like
I'd like to be able to have proper types for my dynamic function based on the types that Xata already has on the client package.
Is it possible to expose the following types?
TransactionOperation
InsertTransactionOperation
UpdateTransactionOperation
DeleteTransactionOperation
Describe alternatives you've considered
In some parts of the project I am pretty much duplicating those and using specific record types:
And in another instance I did infer from the parameter, which isn't very nice:
Additional context
The text was updated successfully, but these errors were encountered: