generated from ViBiOh/goweb
-
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.
feat(db): Adding database connection and crud (#3)
* feat(db): Adding database connection and crud * refactor: Return crud error from service, not database * chore(deps): Bumping to httputils 3.13
- Loading branch information
Showing
11 changed files
with
434 additions
and
23 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 |
---|---|---|
|
@@ -10,3 +10,4 @@ profile.out | |
# Files | ||
cacert.pem | ||
zoneinfo.zip | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Cleaning | ||
DROP TABLE IF EXISTS target; | ||
|
||
DROP INDEX IF EXISTS target_id; | ||
|
||
DROP SEQUENCE IF EXISTS target_id_seq; | ||
|
||
-- target | ||
CREATE SEQUENCE target_seq; | ||
CREATE TABLE target ( | ||
id BIGINT NOT NULL DEFAULT nextval('target_seq'), | ||
owner TEXT NOT NULL, | ||
repository TEXT NOT NULL, | ||
version TEXT NOT NULL, | ||
creation_date TIMESTAMP WITH TIME ZONE DEFAULT now() | ||
); | ||
ALTER SEQUENCE target_seq OWNED BY target.id; | ||
|
||
CREATE UNIQUE INDEX target_id ON target (id); |
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
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,6 @@ | ||
package model | ||
|
||
// RowScanner describes scan ability of a row | ||
type RowScanner interface { | ||
Scan(...interface{}) error | ||
} |
Oops, something went wrong.