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

feat(minato): support indexes #102

Merged
merged 10 commits into from
Aug 14, 2024
Merged

feat(minato): support indexes #102

merged 10 commits into from
Aug 14, 2024

Conversation

Hieuzest
Copy link
Contributor

@Hieuzest Hieuzest commented Jul 30, 2024

Usage

database.extend('foo', {}, {
  indexes: [
    'name', 
    ['foo', 'bar'], 
    {
      name: 'x_asc',
      unique: false,
      keys: {
        x: 'asc',
      },
    },
  ],
})

Driver Index APIs (internal):

getIndexes(table: string): Promise<Driver.Index[]>
createIndex(table: string, index: Driver.Index): Promise<void>
dropIndex(table: string, name: string): Promise<void>

packed:

fix(mongo): initialization of virtual when switching optimizeIndex
feat(relation): support relation in unique definition in model.extend
chore(core): more accurate type for database.create
fix(mysql,postgres): migrate string field with default empty string

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 98.39080% with 7 lines in your changes missing coverage. Please review.

Project coverage is 99.01%. Comparing base (04b03c0) to head (03b6b3b).

Files Patch % Lines
packages/memory/src/index.ts 82.35% 3 Missing ⚠️
packages/postgres/src/index.ts 95.74% 2 Missing ⚠️
packages/sqlite/src/index.ts 95.65% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
+ Coverage   98.97%   99.01%   +0.03%     
==========================================
  Files          39       39              
  Lines       12967    13372     +405     
  Branches     3214     3295      +81     
==========================================
+ Hits        12834    13240     +406     
+ Misses        133      132       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hieuzest Hieuzest requested a review from shigma August 4, 2024 06:52
@shigma shigma merged commit 424d8f2 into cordiverse:master Aug 14, 2024
25 of 26 checks passed
@Hieuzest Hieuzest deleted the feat-index branch November 8, 2024 11:11
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