You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: user.go
    path of file: ./repos/gorsk/pkg/api/auth/platform/pgsql
    
    the code of the file until where you have to start completion: package pgsql

import (
	"github.com/go-pg/pg/v9/orm"

	"github.com/ribice/gorsk"
)

// User represents the client for user table
type User struct{}

// View returns single user by ID
func (u User) View(db orm.DB, id int) (gorsk.User, error) {
	var user gorsk.User
	sql := `SELECT "user".*, "role"."
    
func (u User) View(db orm.DB, id int) (gorsk.User, error) {
	var user gorsk.User
	sql := `SELECT "user".*, "role"."id" AS "role__id", "role"."access_level" AS "role__access_level", "role"."name" AS "role__name" 
	FROM "users" AS "user" LEFT JOIN "roles" AS "role" ON "role"."id" = "user"."role_id" 
	WHERE ("user"."id" = ? and deleted_at is null)`
	_, err := db.QueryOne(&user, sql, id)
	return user, err
}