Skip to content

Implement type-safe primary keys across SDKs #4828

@clockwork-labs-bot

Description

@clockwork-labs-bot

This issue tracks reimplementing the work from stale PR #3476, which has been closed because it is too far out of date to merge directly.

Original pull request

What the original PR was trying to do

Description of Changes * Note: based on (and includes) 2957. For a table like this: generates a type like that: Yet to make it treat the type as Identity. Perhaps a trait is needed instead of a newtype. Usage: * Resolves 3472. API and ABI breaking changes None. Expected complexity level and risk 3? Testing - [x] Module compiles - [x] Module publishes

Closure context

  • I think we need to have a think about this one in the context of other languages. As written this would make Rust types inconsistent with the types in the other languages. Much like in Implemented newtype pattern support for tuples #2957 we'd need to address this for all languages.

Reimplementation notes

  • Reimplement this work on top of current master in a new PR.
  • Keep the original PR linked as historical context and as a source of useful implementation ideas where still relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions