func (d Dao) Create(ctx context.Context, u User) error {
	hashedPassword, err := u.hashPassword()
	if err != nil {
		return err
	}
	q := db.NewExecFunction("user_create", u.Username, hashedPassword)
	if err := d.db.Exec(ctx, q); err != nil {
		return fmt.Errorf("creating user: %w", err)
	}
	return nil
}
// Create adds a user.
Create adds a user.
// Create adds a user .
func (d Dao) Create(ctx context.Context, u User) error {
	hashedPassword, err := u.hashPassword()
	if err != nil {
		return err
	}
	q := db.NewExecFunction("user_create", u.Username, hashedPassword)
	if err := d.db.Exec(ctx, q); err != nil {
		return fmt.Errorf("creating user: %w", err)
	}
	return nil
}
func ( d Dao ) Create ( ctx context . Context , u User ) error { hashedPassword , err := u . hashPassword ( ) if err != nil { return err } q := db . NewExecFunction ( " " , u . Username , hashedPassword ) if err := d . db . Exec ( ctx , q ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
Create adds a user.
Create adds a user .