Skip to content

Commit

Permalink
back to full expresion
Browse files Browse the repository at this point in the history
  • Loading branch information
baxiry committed Jul 7, 2024
1 parent c8d71c6 commit 4f5a538
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions engine/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (db *DB) deleteMany(query gjson.Result) string {
// TODO updateMany update document data
func (db *DB) updateMany(query gjson.Result) (result string) {

mtch := query.Get("m")
mtch := query.Get("match")

newObj := query.Get("data").Str

Expand Down Expand Up @@ -122,7 +122,7 @@ func (db *DB) updateMany(query gjson.Result) (result string) {
// TODO updateOne one update document data
func (db *DB) updateOne(query gjson.Result) (result string) {

mtch := query.Get("m")
mtch := query.Get("match")

newObj := query.Get("data").Str

Expand Down Expand Up @@ -294,7 +294,7 @@ func (db *DB) findOne(query gjson.Result) (res string) {
}
defer rows.Close()

mtch := query.Get("m")
mtch := query.Get("match")
record := ""
for rows.Next() {
if skip != 0 {
Expand All @@ -311,6 +311,7 @@ func (db *DB) findOne(query gjson.Result) (res string) {
return err.Error()
}
if b {

return record
}
}
Expand All @@ -332,7 +333,7 @@ func (db *DB) deleteOne(query gjson.Result) string {

rowid := "0"
record := ""
mtch := query.Get("m")
mtch := query.Get("match")
for rows.Next() {
record = ""
rowid = ""
Expand Down

0 comments on commit 4f5a538

Please sign in to comment.