forked from medusajs/medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(index): index dml (medusajs#10482)
What: - DML - `autoincrement` property - Index `type` option (GIN) - Index module - DML
- Loading branch information
1 parent
096f1c2
commit 69f4c4f
Showing
17 changed files
with
467 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@medusajs/index": patch | ||
"@medusajs/types": patch | ||
"@medusajs/utils": patch | ||
--- | ||
|
||
chore: index module to DML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/core/utils/src/dml/__tests__/autoincrement-property.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { expectTypeOf } from "expect-type" | ||
import { AutoIncrementProperty } from "../properties/autoincrement" | ||
|
||
describe("Autoincrement property", () => { | ||
test("create autoincrement property type", () => { | ||
const property = new AutoIncrementProperty() | ||
|
||
expectTypeOf(property["$dataType"]).toEqualTypeOf<number>() | ||
expect(property.parse("display_id")).toEqual({ | ||
fieldName: "display_id", | ||
dataType: { | ||
name: "serial", | ||
options: {}, | ||
}, | ||
nullable: false, | ||
indexes: [], | ||
relationships: [], | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.