-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Companion to SpacetimeDB#1812 (light tx, ts) (#110)
* support TransactionUpdateLight and CallReducerFlags * Run generate * Push creds * run prettier * Add changeset * Turn on withLightMode --------- Co-authored-by: Puru Vijay <[email protected]> Co-authored-by: Puru Vijay <[email protected]>
- Loading branch information
1 parent
6cee7f4
commit a501f5c
Showing
21 changed files
with
328 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clockworklabs/spacetimedb-sdk': minor | ||
--- | ||
|
||
Support light tx updates via builder.with*light_mode(*) and the call flag NoSuccessNotify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
packages/sdk/src/client_api/transaction_update_light_type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE | ||
// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. | ||
|
||
import { | ||
// @ts-ignore | ||
Address, | ||
// @ts-ignore | ||
AlgebraicType, | ||
// @ts-ignore | ||
AlgebraicValue, | ||
// @ts-ignore | ||
BinaryReader, | ||
// @ts-ignore | ||
BinaryWriter, | ||
// @ts-ignore | ||
DBConnectionBuilder, | ||
// @ts-ignore | ||
DBConnectionImpl, | ||
// @ts-ignore | ||
DBContext, | ||
// @ts-ignore | ||
Event, | ||
// @ts-ignore | ||
EventContextInterface, | ||
// @ts-ignore | ||
Identity, | ||
// @ts-ignore | ||
ProductType, | ||
// @ts-ignore | ||
ProductTypeElement, | ||
// @ts-ignore | ||
SumType, | ||
// @ts-ignore | ||
SumTypeVariant, | ||
// @ts-ignore | ||
TableCache, | ||
// @ts-ignore | ||
deepEqual, | ||
} from '..'; | ||
// @ts-ignore | ||
import { DatabaseUpdate as __DatabaseUpdate } from './database_update_type'; | ||
|
||
export type TransactionUpdateLight = { | ||
requestId: number; | ||
update: __DatabaseUpdate; | ||
}; | ||
|
||
/** | ||
* A namespace for generated helper functions. | ||
*/ | ||
export namespace TransactionUpdateLight { | ||
/** | ||
* A function which returns this type represented as an AlgebraicType. | ||
* This function is derived from the AlgebraicType used to generate this type. | ||
*/ | ||
export function getTypeScriptAlgebraicType(): AlgebraicType { | ||
return AlgebraicType.createProductType([ | ||
new ProductTypeElement('requestId', AlgebraicType.createU32Type()), | ||
new ProductTypeElement( | ||
'update', | ||
__DatabaseUpdate.getTypeScriptAlgebraicType() | ||
), | ||
]); | ||
} | ||
|
||
export function serialize( | ||
writer: BinaryWriter, | ||
value: TransactionUpdateLight | ||
): void { | ||
TransactionUpdateLight.getTypeScriptAlgebraicType().serialize( | ||
writer, | ||
value | ||
); | ||
} | ||
|
||
export function deserialize(reader: BinaryReader): TransactionUpdateLight { | ||
return TransactionUpdateLight.getTypeScriptAlgebraicType().deserialize( | ||
reader | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.