Skip to content

Conversation

@goldenice
Copy link
Contributor

Merge #6 first

This adds explicit nullability, the ability to provide 'NULLABLE' and 'NOT NULL' instead of true and false. This makes it clearer what is going on at a glance. In the future we'll probably deprecate passing the booleans and remove it in the next major release.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces explicit nullability options for entity field definitions, allowing developers to use 'NULLABLE' and 'NOT NULL' string literals instead of boolean values for better code readability. The change maintains backward compatibility with existing boolean values.

Key changes:

  • Adds new Nullable type that accepts string literals or legacy boolean values
  • Introduces isNullable() helper function to handle both old and new nullability formats
  • Refactors type definitions into separate modules for better organization

Reviewed Changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/entities/Nullable.ts Defines new nullability types and helper function
src/entities/BaseEntity.ts Updates field and relation types to use new Nullable type
src/main.ts Major refactor moving types to separate modules and updating nullability checks
src/types/*.ts New type definition modules extracted from main.ts
src/helpers/sql.ts Adds mergeSql function extracted from main.ts
src/relations/ormRelationGetter.ts Extracts ORM relation getter logic into separate module
src/tools/validateSchema.ts Updates import paths
tests/testHelpers.ts Updates import path for relation getter function
.changeset/fair-knives-notice.md Documents the feature addition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@goldenice goldenice force-pushed the add-explicit-nullability-to-replace-boolean branch from 6e28658 to 666ed7c Compare October 17, 2025 15:15
@goldenice goldenice force-pushed the add-explicit-nullability-to-replace-boolean branch from 666ed7c to 986174d Compare October 17, 2025 15:16
@goldenice goldenice requested a review from Copilot October 17, 2025 15:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@goldenice goldenice merged commit d472039 into main Oct 21, 2025
4 checks passed
@goldenice goldenice deleted the add-explicit-nullability-to-replace-boolean branch October 21, 2025 10:06
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.

3 participants