gendry

a golang library for sql builder

APACHE-2.0 License

Stars
1.6K
Committers
27

Bot releases are visible (Hide)

gendry - v1.8.2 Latest Release

Published by caibirdme 12 months ago

What's Changed

Full Changelog: https://github.com/didi/gendry/compare/v1.8.1...v1.8.2

gendry - v1.8.1

Published by caibirdme about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/didi/gendry/compare/v1.8.0...v1.8.1

gendry - v1.8.0

Published by caibirdme about 2 years ago

New Features

  • support multiple _or condition, #130 (@zhanghongnian )
  • Fix typo in readme, #132 (@jxba016050 )
gendry - v.1.7.0

Published by caibirdme over 3 years ago

Add

  • when value is a slice, in keyword is omitable
map[string]interface{}{
  "foo in": []int{1,2,3},
}

// equals to
map[string]interface{}{
  "foo": []int{1,2,3},
}

Fix

  • if an object implements sql.Scanner, it'll take over the Scan job
gendry - v1.6.0

Published by caibirdme almost 4 years ago

  • support _limit in BuildUpdate
  • optimize unnecessary map copy, which makes gendry run much faster
gendry - v1.5.0

Published by caibirdme about 4 years ago

  • support build insert on duplicate
  • update doc
  • support _lockMode
  • Fix bug of wrongly trimed quota field
gendry - v1.4.0

Published by caibirdme over 4 years ago

gendry - add go mod

Published by caibirdme almost 5 years ago

bump version to 1.3.2

gendry - v1.3.1

Published by caibirdme about 5 years ago

Fix bug of _orderby&_groupby.

in mysql manual:

Parameter markers can be used only where data values should appear, not for SQL keywords, identifiers, and so forth.

see also: issue mysql manual

gendry - v1.3.0

Published by caibirdme about 5 years ago

  • Fix potential sql injection bug caused by _orderby, _groupby and _limit
  • Using strings.Builder to concat sql, which makes BuildSelectnearly 10% faster
gendry - v1.2.1

Published by caibirdme over 5 years ago

support not like

gendry - v1.2.0

Published by caibirdme over 5 years ago

add support for between and not between:

	where := map[string]interface{}{
		"age not between": []int{10, 30},
		"name":            "caibirdme",
		"score between":   []float64{3.5, 7.2},
	}
gendry - bug fix

Published by caibirdme over 5 years ago

make regexp non-greedy

gendry - v1.1.1

Published by caibirdme over 5 years ago

support scan boolean type(in mysql tinyint(1))

gendry - v1.1.0

Published by caibirdme over 5 years ago

  • support replace into
  • support insert ignore into

Thx for @guangxuewu 's contribution

gendry - stable

Published by caibirdme over 5 years ago

the library is stable and can be used in production with confidence