tangled
alpha
login
or
join now
moth11.net
/
rvcx
3
fork
atom
backend for xcvr appview
3
fork
atom
overview
issues
4
pulls
pipelines
sql syntax
moth11.net
5 months ago
ec8f6ae8
ae11d64c
+6
-4
1 changed file
expand all
collapse all
unified
split
server
internal
db
lexicon.go
+6
-4
server/internal/db/lexicon.go
···
367
}
368
369
func (s *Store) GetImage(uri string, ctx context.Context) (*types.Image, error) {
370
-
row := s.pool.QueryRow(ctx, `SELECT FROM images (
371
did,
372
signet_uri,
373
blob_cid,
···
379
color,
380
cid,
381
posted_at
382
-
) WHERE uri = $1`, uri)
383
var image types.Image
384
err := row.Scan(&image.DID,
385
&image.SignetURI,
···
400
}
401
402
func (s *Store) GetImageDidCID(did string, cid string, ctx context.Context) (*types.Image, error) {
403
-
row := s.pool.QueryRow(ctx, `SELECT FROM images (
404
uri,
405
signet_uri,
406
cid,
···
411
nick,
412
color,
413
posted_at
414
-
) WHERE did = $1 AND blob_cid = $2`, did, cid)
0
0
415
var image types.Image
416
err := row.Scan(&image.URI,
417
&image.SignetURI,
···
367
}
368
369
func (s *Store) GetImage(uri string, ctx context.Context) (*types.Image, error) {
370
+
row := s.pool.QueryRow(ctx, `SELECT (
371
did,
372
signet_uri,
373
blob_cid,
···
379
color,
380
cid,
381
posted_at
382
+
) FROM images WHERE uri = $1`, uri)
383
var image types.Image
384
err := row.Scan(&image.DID,
385
&image.SignetURI,
···
400
}
401
402
func (s *Store) GetImageDidCID(did string, cid string, ctx context.Context) (*types.Image, error) {
403
+
row := s.pool.QueryRow(ctx, `SELECT (
404
uri,
405
signet_uri,
406
cid,
···
411
nick,
412
color,
413
posted_at
414
+
)
415
+
FROM images
416
+
WHERE did = $1 AND blob_cid = $2`, did, cid)
417
var image types.Image
418
err := row.Scan(&image.URI,
419
&image.SignetURI,