From 41d1336f58d2eb075fedec29f57f2f8733995946 Mon Sep 17 00:00:00 2001 From: ae Date: Mon, 31 Mar 2025 13:33:27 +0300 Subject: [PATCH] refactor: rename db module to data for clarity --- server/pkg/{db => data}/db.go | 2 +- server/pkg/{db => data}/models.go | 2 +- server/pkg/{db => data}/note_versions.sql.go | 2 +- server/pkg/{db => data}/notes.sql.go | 2 +- server/pkg/{db => data}/refresh_tokens.sql.go | 2 +- server/pkg/{db => data}/users.sql.go | 2 +- server/sql/sqlc.yaml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename server/pkg/{db => data}/db.go (97%) rename server/pkg/{db => data}/models.go (99%) rename server/pkg/{db => data}/note_versions.sql.go (99%) rename server/pkg/{db => data}/notes.sql.go (99%) rename server/pkg/{db => data}/refresh_tokens.sql.go (99%) rename server/pkg/{db => data}/users.sql.go (99%) diff --git a/server/pkg/db/db.go b/server/pkg/data/db.go similarity index 97% rename from server/pkg/db/db.go rename to server/pkg/data/db.go index eeee39e..062888c 100644 --- a/server/pkg/db/db.go +++ b/server/pkg/data/db.go @@ -2,7 +2,7 @@ // versions: // sqlc v1.28.0 -package db +package data import ( "context" diff --git a/server/pkg/db/models.go b/server/pkg/data/models.go similarity index 99% rename from server/pkg/db/models.go rename to server/pkg/data/models.go index 0087a0e..1cabac4 100644 --- a/server/pkg/db/models.go +++ b/server/pkg/data/models.go @@ -2,7 +2,7 @@ // versions: // sqlc v1.28.0 -package db +package data import ( "time" diff --git a/server/pkg/db/note_versions.sql.go b/server/pkg/data/note_versions.sql.go similarity index 99% rename from server/pkg/db/note_versions.sql.go rename to server/pkg/data/note_versions.sql.go index ab81198..73269bb 100644 --- a/server/pkg/db/note_versions.sql.go +++ b/server/pkg/data/note_versions.sql.go @@ -3,7 +3,7 @@ // sqlc v1.28.0 // source: note_versions.sql -package db +package data import ( "context" diff --git a/server/pkg/db/notes.sql.go b/server/pkg/data/notes.sql.go similarity index 99% rename from server/pkg/db/notes.sql.go rename to server/pkg/data/notes.sql.go index 8a31708..8ba0fcf 100644 --- a/server/pkg/db/notes.sql.go +++ b/server/pkg/data/notes.sql.go @@ -3,7 +3,7 @@ // sqlc v1.28.0 // source: notes.sql -package db +package data import ( "context" diff --git a/server/pkg/db/refresh_tokens.sql.go b/server/pkg/data/refresh_tokens.sql.go similarity index 99% rename from server/pkg/db/refresh_tokens.sql.go rename to server/pkg/data/refresh_tokens.sql.go index f817010..2fb3453 100644 --- a/server/pkg/db/refresh_tokens.sql.go +++ b/server/pkg/data/refresh_tokens.sql.go @@ -3,7 +3,7 @@ // sqlc v1.28.0 // source: refresh_tokens.sql -package db +package data import ( "context" diff --git a/server/pkg/db/users.sql.go b/server/pkg/data/users.sql.go similarity index 99% rename from server/pkg/db/users.sql.go rename to server/pkg/data/users.sql.go index 7b5e45e..6dbb0d3 100644 --- a/server/pkg/db/users.sql.go +++ b/server/pkg/data/users.sql.go @@ -3,7 +3,7 @@ // sqlc v1.28.0 // source: users.sql -package db +package data import ( "context" diff --git a/server/sql/sqlc.yaml b/server/sql/sqlc.yaml index b3d3c6c..572ccb1 100644 --- a/server/sql/sqlc.yaml +++ b/server/sql/sqlc.yaml @@ -6,8 +6,8 @@ sql: schema: "./migrations/" gen: go: - package: "db" - out: "../pkg/db" + package: "data" + out: "../pkg/data" sql_package: "pgx/v5" emit_json_tags: true overrides: