Skip to content

feat: rename schema to valueSchema#1482

Merged
alvrs merged 9 commits intomainfrom
alvrs/rename-value-schema
Sep 15, 2023
Merged

feat: rename schema to valueSchema#1482
alvrs merged 9 commits intomainfrom
alvrs/rename-value-schema

Conversation

@alvrs
Copy link
Member

@alvrs alvrs commented Sep 14, 2023

Fixes #1129

@changeset-bot
Copy link

changeset-bot bot commented Sep 14, 2023

🦋 Changeset detected

Latest commit: 449bde4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@latticexyz/cli Major
@latticexyz/protocol-parser Major
@latticexyz/store-sync Major
@latticexyz/store Major
create-mud Major
@latticexyz/dev-tools Major
@latticexyz/store-indexer Major
@latticexyz/react Major
@latticexyz/world Major
@latticexyz/abi-ts Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
@latticexyz/ecs-browser Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/utils Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

dk1a
dk1a previously approved these changes Sep 14, 2023
frolic
frolic previously approved these changes Sep 14, 2023
@alvrs
Copy link
Member Author

alvrs commented Sep 14, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@alvrs alvrs force-pushed the alvrs/rename-value-schema branch from 4189c86 to 14582af Compare September 14, 2023 20:50

- You can adjust `createClientComponents.ts` to either override contract components or add client-only components.
- If you are using chains other than foundry/anvil and lattice testnet, you can add them in `getNetworkConfig.ts`
- `createSystemCalls` represents how the client talks to the system contracts via our `worldSend` helper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw we still have and use createSystemCalls, we just go through worldContract.write instead


- `keySchema`, the key used to find entries
- `schema`, the value in the entry (soon to be renamed to `valueSchema`)
- `valueSchema`, the value in the entry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

keySchema?: Record<string, KeySchema<StaticUserTypes>>;
/** Table's column names mapped to their types. Table name's 1st letter should be lowercase. */
schema: SchemaConfig<UserTypes>;
/** Table's field names mapped to their types. Table name's 1st letter should be lowercase. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the second sentence here is weird, should this be "field name's first letter"?

// to allow using the table before it is registered. This is because `getRecord` passes the valueSchema
// to store, while `getField` loads it from storage. Remove this once we have support for passing the
// schema in `getField` too. (See https://github.com/latticexyz/mud/issues/444)
// valueSchema in `getField` too. (See https://github.com/latticexyz/mud/issues/444)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think getField now supports passing in value schema (or field layout now) so is this comment/workaround still relevant?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, will remove this in a followup

@alvrs alvrs merged commit 07dd6f3 into main Sep 15, 2023
@alvrs alvrs deleted the alvrs/rename-value-schema branch September 15, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename schema to valueSchema (to make it consistent with keySchema)

3 participants