// LoadChatsFromPostgres loads chats from postgres
LoadChatsFromPostgres loads chats from postgres
// LoadChatsFromPostgres loads chats from postgres
func (d *ChatDB) LoadChatsFromPostgres() {
	rows, err := d.p.pool.Query(d.p.ctx, `SELECT "chat" FROM "chats" ORDER BY "chat" ASC;`)
	if err != nil {
		return
	}
	defer rows.Close()
	var s string
	for rows.Next() {
		err := rows.Scan(&s)
		if err != nil || s == "" {
			return
		}
		d.Add(s)
	}
}
func ( d * ChatDB ) LoadChatsFromPostgres ( ) { rows , err := d . p . pool . Query ( d . p . ctx , `SELECT "chat" FROM "chats" ORDER BY "chat" ASC;` ) if err != nil { return } defer rows . Close ( ) var s string for rows . Next ( ) { err := rows . Scan ( & s ) if err != nil || s == " " { return } d . Add ( s ) } }
LoadChatsFromPostgres loads chats from postgres
LoadChatsFromPostgres loads chats from postgres