Merged in feature/textExtractionsPart2 (pull request #193)
Continue finishing the parts of the text extraction plan * add missing fields
This commit is contained in:
@@ -255,6 +255,33 @@ func (q *Queries) IsClientSynced(ctx context.Context, dollar_1 *string) (bool, e
|
||||
return is_synced, err
|
||||
}
|
||||
|
||||
const listClients = `-- name: ListClients :many
|
||||
SELECT clientid, name, cansync FROM fullClients ORDER BY name
|
||||
`
|
||||
|
||||
// Returns all clients ordered by name
|
||||
//
|
||||
// SELECT clientid, name, cansync FROM fullClients ORDER BY name
|
||||
func (q *Queries) ListClients(ctx context.Context) ([]*Fullclient, error) {
|
||||
rows, err := q.db.Query(ctx, listClients)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []*Fullclient{}
|
||||
for rows.Next() {
|
||||
var i Fullclient
|
||||
if err := rows.Scan(&i.Clientid, &i.Name, &i.Cansync); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, &i)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateClient = `-- name: UpdateClient :exec
|
||||
UPDATE clients SET name = $1 WHERE clientId = $2
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user