-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added Postgres Full Text Index together from Marten #110
Conversation
…efinition Renamed setting DataConfig to DocumentCocument to align with PG naming and made it required Added option to specify FullTextIndex through ColumnExpression Added more tests
3303440
to
dfebada
Compare
…migration for Marten users Added more tests for FullTextIndexDefinition definition
Added common base class for index deltas detection tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Please check couple of comments added.
src/Weasel.Postgresql.Tests/Tables/Indexes/FullTextIndexDefinitionDeltasTests.cs
Outdated
Show resolved
Hide resolved
set => regConfig = value ?? DefaultRegConfig; | ||
} | ||
|
||
public string DocumentConfig { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do understand, you are initializing it in ctor, but still, for the setter, wouldn't you check the value for null and set it to DataDocumentConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're using nullable reference types, the compiler will tell us we should not provide a null value there. If a user tries to cheat and forcibly put null, it's their mistake.
I'd like to get rid of DataDocumentConfig
as it was my mistake to name it like that. Postgres names it document
and if we put it into Weasel, then I think that we should keep naming generic.
I left DataDocumentConfig
to not break people code when they upgrade Marten.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, make sense!
Moved the Postgres Full Text Index code from Marten.
Adjusted the naming to the Weasel and Postgres conventions:
FullTextIndex
toFullTextIndexDefinition
DataConfig
toDocumentConfig
to align with PG naming and make it generic, as someone may use just regular column. KeptDataConfig
as obsolete, to make easier transition for Marten users.Moved both the definition and delta detection tests. Added base class for index tests, as next to be moved will be NGram index.