Skip to content

Commit

Permalink
Import lib
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Aug 16, 2024
1 parent d900326 commit 592f4d6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
- Elements placed in the root should not use an empty list.
- They should instead by represented by `/1/`, `/2/`, etc.

## Installation
- The library can be installed using `go get`.
-
```bash
go get github.com/tentone/gorm-hierarchyid
```

## Model definition
- Declare `HierarchyID` type in your gorm model, there is no need to specify the DB data type.
- Is is recommended to also mark the field as `unique` to avoid duplicates.
Expand Down
2 changes: 1 addition & 1 deletion db_test.go → hierarchyid/db_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package hierarchyid

import (
"slices"
Expand Down
2 changes: 1 addition & 1 deletion hierarchyid.go → hierarchyid/hierarchyid.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package hierarchyid

import (
"database/sql/driver"
Expand Down
2 changes: 1 addition & 1 deletion patterns.go → hierarchyid/patterns.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package hierarchyid

// Represents a possible pattern for hierarchyid values.
//
Expand Down
2 changes: 1 addition & 1 deletion type.go → hierarchyid/type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package hierarchyid

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion type_test.go → hierarchyid/type_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package hierarchyid

import (
"encoding/hex"
Expand Down

0 comments on commit 592f4d6

Please sign in to comment.