From c4602c8c3bed930196e2c90b105594b272535755 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sun, 25 Feb 2024 19:01:34 -0500 Subject: [PATCH] chore(db): update sqlc --- database/db.go | 2 +- database/models.go | 40 +++++++++++++++++++--------------------- database/query.sql.go | 2 +- sqlc.yaml | 1 + 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/database/db.go b/database/db.go index 37d600d..61f5bf4 100644 --- a/database/db.go +++ b/database/db.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.25.0 package database diff --git a/database/models.go b/database/models.go index 84c25cc..33f8b11 100644 --- a/database/models.go +++ b/database/models.go @@ -1,12 +1,10 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.25.0 package database -import ( - "database/sql" -) +import () type Activity struct { ID int64 `json:"id"` @@ -121,23 +119,23 @@ type UserStreak struct { } type ViewDocumentUserStatistic struct { - DocumentID string `json:"document_id"` - UserID string `json:"user_id"` - Percentage float64 `json:"percentage"` - LastRead interface{} `json:"last_read"` - ReadPercentage sql.NullFloat64 `json:"read_percentage"` - TotalTimeSeconds sql.NullFloat64 `json:"total_time_seconds"` - TotalWordsRead interface{} `json:"total_words_read"` - TotalWpm int64 `json:"total_wpm"` - YearlyTimeSeconds sql.NullFloat64 `json:"yearly_time_seconds"` - YearlyWordsRead interface{} `json:"yearly_words_read"` - YearlyWpm interface{} `json:"yearly_wpm"` - MonthlyTimeSeconds sql.NullFloat64 `json:"monthly_time_seconds"` - MonthlyWordsRead interface{} `json:"monthly_words_read"` - MonthlyWpm interface{} `json:"monthly_wpm"` - WeeklyTimeSeconds sql.NullFloat64 `json:"weekly_time_seconds"` - WeeklyWordsRead interface{} `json:"weekly_words_read"` - WeeklyWpm interface{} `json:"weekly_wpm"` + DocumentID string `json:"document_id"` + UserID string `json:"user_id"` + Percentage float64 `json:"percentage"` + LastRead interface{} `json:"last_read"` + ReadPercentage *float64 `json:"read_percentage"` + TotalTimeSeconds *float64 `json:"total_time_seconds"` + TotalWordsRead interface{} `json:"total_words_read"` + TotalWpm int64 `json:"total_wpm"` + YearlyTimeSeconds *float64 `json:"yearly_time_seconds"` + YearlyWordsRead interface{} `json:"yearly_words_read"` + YearlyWpm interface{} `json:"yearly_wpm"` + MonthlyTimeSeconds *float64 `json:"monthly_time_seconds"` + MonthlyWordsRead interface{} `json:"monthly_words_read"` + MonthlyWpm interface{} `json:"monthly_wpm"` + WeeklyTimeSeconds *float64 `json:"weekly_time_seconds"` + WeeklyWordsRead interface{} `json:"weekly_words_read"` + WeeklyWpm interface{} `json:"weekly_wpm"` } type ViewUserStreak struct { diff --git a/database/query.sql.go b/database/query.sql.go index bbf2bf0..0092c6c 100644 --- a/database/query.sql.go +++ b/database/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.21.0 +// sqlc v1.25.0 // source: query.sql package database diff --git a/sqlc.yaml b/sqlc.yaml index b98198e..9f6b8a5 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -8,6 +8,7 @@ sql: package: "database" out: "database" emit_json_tags: true + emit_pointers_for_null_types: true overrides: # Documents - column: "documents.md5"