Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
demoManito committed Oct 10, 2024
1 parent 0369fa2 commit c5081dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions finisher_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ func (db *DB) Count(count *int64) (tx *DB) {

// Exists checks if there is any record matching the given conditions
func (db *DB) Exists() (bool, error) {
var exist bool
return exist, db.Session(&Session{NewDB: true}).
Raw("SELECT ? AS exist", Expr("EXISTS(?)", db.Select("1"))).
Pluck("exist", &exist).Error
var exists bool
return exists, db.Session(&Session{NewDB: true}).
Raw("SELECT ?", Expr("EXISTS(?)", db.Select("1"))).
Pluck("exists", &exists).Error
}

func (db *DB) Row() *sql.Row {
Expand Down

0 comments on commit c5081dd

Please sign in to comment.