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

Add options to replace serials and missing refs #88

Closed
wants to merge 1 commit into from

Conversation

joshbwlng
Copy link
Contributor

@joshbwlng joshbwlng commented Nov 28, 2024

Add new options to replace Serial/Big Serial typed
fields and instead return them as Integer. And another
option to replace missing references with the references
datatype.

Change-type: minor

@joshbwlng joshbwlng self-assigned this Nov 28, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@joshbwlng joshbwlng force-pushed the joshbwlng/serial branch 2 times, most recently from fde5c2d to eb21ca0 Compare November 29, 2024 03:42
@joshbwlng joshbwlng requested a review from Page- November 29, 2024 03:49
Copy link
Contributor

@Page- Page- left a comment

Choose a reason for hiding this comment

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

Can you add these behind an opts object for abstractSqlToTypescriptTypes so that it is possible to tailor the generated output based on the use case, because there are definitely use cases where keeping the field references as type references makes sense (any case where we aren't subsetting the model imo)

src/generate.ts Outdated Show resolved Hide resolved
src/generate.ts Outdated Show resolved Hide resolved
@joshbwlng joshbwlng force-pushed the joshbwlng/serial branch 3 times, most recently from 5056366 to 9e1b6bb Compare December 3, 2024 06:47
@joshbwlng joshbwlng changed the title Return Serial fields as Integer Add options to replace serials and missing refs Dec 3, 2024
@joshbwlng
Copy link
Contributor Author

@Page- Made some changes that I think get this PR a bit closer. If we do in fact want to keep two separate options I'll split them out into two separate commits.

@joshbwlng joshbwlng requested a review from Page- December 3, 2024 06:49
src/generate.ts Outdated Show resolved Hide resolved
src/generate.ts Outdated Show resolved Hide resolved
src/generate.ts Outdated Show resolved Hide resolved
Add new options to replace Serial/Big Serial typed
fields and instead return them as Integer. And another
option to replace missing references with the references
datatype.

Change-type: minor
@joshbwlng
Copy link
Contributor Author

@joshbwlng joshbwlng closed this Jan 7, 2025
@joshbwlng joshbwlng deleted the joshbwlng/serial branch January 7, 2025 22:24
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.

2 participants