30 lines
568 B
Go
30 lines
568 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
// source: space.sql
|
|
|
|
package repo
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const getSpaceById = `-- name: GetSpaceById :one
|
|
SELECT id, name, invite_code, owner_id, create_time, update_time FROM space WHERE id = $1
|
|
`
|
|
|
|
// 根据id获取分享空间信息
|
|
func (q *Queries) GetSpaceById(ctx context.Context, id int64) (Space, error) {
|
|
row := q.db.QueryRow(ctx, getSpaceById, id)
|
|
var i Space
|
|
err := row.Scan(
|
|
&i.ID,
|
|
&i.Name,
|
|
&i.InviteCode,
|
|
&i.OwnerID,
|
|
&i.CreateTime,
|
|
&i.UpdateTime,
|
|
)
|
|
return i, err
|
|
}
|