revamp, returing will include the table name.cloumn_name. feat, ts_rank, ts_search helpers

This commit is contained in:
2025-11-02 22:04:02 +05:30
parent bb6a45732f
commit a795c0e8d6
9 changed files with 92 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ package db
import "code.patial.tech/go/pgm"
var (
User = pgm.Table{Name: "users", FieldCount: 11}
User = pgm.Table{Name: "users", FieldCount: 12}
UserSession = pgm.Table{Name: "user_sessions", FieldCount: 8}
BranchUser = pgm.Table{Name: "branch_users", FieldCount: 5}
Post = pgm.Table{Name: "posts", FieldCount: 5}

View File

@@ -25,6 +25,8 @@ const (
StatusID pgm.Field = "users.status_id"
// MfaKind field has db type "character varying(50) DEFAULT 'None'::character varying"
MfaKind pgm.Field = "users.mfa_kind"
// SearchVector field has db type "tsvector"
SearchVector pgm.Field = "users.search_vector"
// CreatedAt field has db type "timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP"
CreatedAt pgm.Field = "users.created_at"
// UpdatedAt field has db type "timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP"