Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide full model syntax for queries #1

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Provide full model syntax for queries #1

merged 1 commit into from
Jan 9, 2025

Conversation

leo
Copy link
Member

@leo leo commented Jan 9, 2025

This change ensures that schema queries can make use of the same syntax that is used for defining the database schema in code, with exactly the same syntax helpers as well:

import { create } from 'ronin';
import { string } from 'ronin/schema';

await create.model({
  slug: 'account',
  fields: {
    handle: string().required()
  }
});

You can read more about this change in the original pull request in which the change was applied.

@leo leo added the enhancement New feature or request label Jan 9, 2025
@leo leo requested a review from colodenn January 9, 2025 10:05
Copy link

github-actions bot commented Jan 9, 2025

Released an experimental package:

bun add ronin@leo-ron-1071-experimental-1

This package will be removed after the pull request has been merged.

@ronin-co ronin-co deleted a comment from linear bot Jan 9, 2025
@leo leo marked this pull request as ready for review January 9, 2025 10:07
@leo leo enabled auto-merge (squash) January 9, 2025 10:08
@leo leo merged commit 3e9acb5 into main Jan 9, 2025
5 checks passed
@leo leo deleted the leo/ron-1071 branch January 9, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants