Skip to content

feat(tsvector): TSVECTOR support - #12631

Closed
oktapodia wants to merge 7 commits into
sequelize:masterfrom
oktapodia:feature/add-tsvector-support
Closed

oktapodia wants to merge 7 commits into
sequelize:masterfrom
oktapodia:feature/add-tsvector-support

Conversation

@oktapodia

Copy link
Copy Markdown
Contributor

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Added TSVECTOR datatype and @@ operator for postgresql more information about datatype here:
postgresql.org/docs/current/functions-textsearch.html

Closes #1580, #10956

@codecov

codecov Bot commented Aug 20, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #12631 into master will decrease coverage by 0.06%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12631      +/-   ##
==========================================
- Coverage   96.32%   96.26%   -0.07%     
==========================================
  Files          95       95              
  Lines        9261     9265       +4     
  Branches       90       90              
==========================================
- Hits         8921     8919       -2     
- Misses        323      329       +6     
  Partials       17       17              
Impacted Files Coverage Δ
src/data-types.js 90.37% <0.00%> (-0.95%) ⬇️
src/dialects/abstract/query-generator/operators.js 90.90% <ø> (ø)
src/dialects/postgres/index.js 100.00% <ø> (ø)
src/operators.ts 100.00% <ø> (ø)
src/dialects/postgres/data-types.js 96.27% <100.00%> (+0.01%) ⬆️
src/dialects/abstract/query-generator.js 97.41% <0.00%> (-0.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e144683...99c896e. Read the comment docs.

@oktapodia
oktapodia force-pushed the feature/add-tsvector-support branch 3 times, most recently from 209929f to 60e1645 Compare August 20, 2020 11:56
@oktapodia
oktapodia force-pushed the feature/add-tsvector-support branch from 60e1645 to 478b78b Compare August 20, 2020 12:25
where: { username: 'longUserNAME' }
});
expect(user).to.exist;
expect(user.username).to.equal("'longUserNAME'");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No idea why the result came out wrapped with quotes, no idea how to trim those via the TSVECTOR class

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's totally normal the text values are retrieved as words hence these words are surrounded by quotes,
sees also here: https://www.postgresql.org/docs/10/datatype-textsearch.html

@oktapodia
oktapodia marked this pull request as ready for review August 20, 2020 13:15
@papb
papb changed the base branch from master to main January 18, 2021 02:47
@papb
papb changed the base branch from main to master January 18, 2021 04:21
@papb

papb commented Jan 18, 2021 •

Copy link
Copy Markdown
Member

Hello @oktapodia! I see you are a first-time contributor, thank you for taking the time to help Sequelize! I hope to see more PRs from you in the future!

I am so sorry to take so long to review your PR. I am less busy now and will pay more attention not only to your PRs but everyone else's as well.

It seems you did not check the allow edits from maintainers checkbox when creating the PR. I tried to update your PR, but got an error 403. So I created a new one: #12955 and I am closing this one. Of course, you are still the author of your commits! Please say something there :)

@papb papb closed this Jan 18, 2021
@oktapodia
oktapodia deleted the feature/add-tsvector-support branch January 19, 2021 10:35
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.

Fulltext support

4 participants