Victor Popkov
415b9cf310
add support for time.Time pointer in struct types
...
Allow to use pointer *time.Time as a type in combination with orm tags in struct. This enables to treat them as "empty" in JSON marshaling/unmarshaling when using 'json:"null,omitempty'.
2016-06-22 16:57:05 +03:00
ysqi
3f016840db
fixed test error
2016-06-04 10:41:55 +08:00
ysqi
d528fafd43
ignore case of tag and fixed bug for columName
2016-06-03 22:06:43 +08:00
astaxie
520a417cca
Merge pull request #1874 from Maxgis/master
...
change limit 1000 to 1,reduce the amount the data
2016-04-26 09:56:44 +08:00
maxin[马鑫]
56dc9bf622
add return ErrMultiRows
2016-04-25 15:51:12 +08:00
maxin[马鑫]
9ce6dc4cdf
remove test ; because rows are returned in an unspecified order
2016-04-13 21:04:46 +08:00
miraclesu
903e21bef2
orm: add test case for InsertMulti
2016-04-13 20:22:27 +08:00
maxin[马鑫]
81c6c898cf
remove orm one function thorw ErrMultiRows error
2016-04-13 10:36:12 +08:00
miraclesu
99f1e6c8b5
orm: fix golint
2016-04-12 11:00:31 +08:00
miraclesu
e95bef1331
orm: add test case for json & jsonb type support
2016-04-12 11:00:31 +08:00
Ivan Cadri
d49c7f96cb
added functionality for column type time
...
updated the model_fields to cater for the time field type
2016-04-03 16:58:19 +02:00
miraclesu
3ca44071e6
orm: insert specified values for insertMulti
2016-03-26 21:51:05 +08:00
miraclesu
e0a36fb61e
Merge branch 'develop' into feature/orm_auto
2016-03-26 21:16:52 +08:00
miraclesu
eaf38bb096
orm: add test case for uint pk read or create
2016-03-23 21:59:09 +08:00
miraclesu
8f70df6c7b
orm: add test case for insert specified value to auto field
2016-03-23 20:28:22 +08:00
miraclesu
84ae930c64
orm: Add test case for integer pk
2016-03-18 21:58:11 +08:00
miraclesu
dcfcb2789e
orm: inline struct relate test case
2016-03-13 21:04:39 +08:00
astaxie
1f0a65f0a2
fix the orm test
2016-03-10 22:21:21 +08:00
miraclesu
64e0858d44
orm: add inline struct test case
2016-03-08 22:24:38 +08:00
astaxie
797571c85f
fix the ORM test case
2016-01-15 14:36:45 +08:00
astaxie
7dbeb2c39a
fix the default value
2016-01-15 08:43:02 +08:00
Pelle Johnsen
906637ae8b
Fix issue with reverse(many) for models with custom pk
...
- Also add test covering the issue
2015-12-15 17:39:08 +01:00
ngaut
09b7457ac6
orm_test: Skip relation test
2015-09-17 17:05:40 +08:00
ngaut
c841a77ad6
Orm: Add tidb for query builder
2015-09-17 17:04:23 +08:00
ngaut
c73e0395ed
Orm: Support TiDB
2015-09-17 17:04:23 +08:00
astaxie
68ec133aa8
golint orm
2015-09-12 21:46:43 +08:00
astaxie
1d8afdc9c9
gofmt -s & go_vet
2015-05-25 09:10:34 +08:00
Peter Fern
d7c3727f96
Add support for basic type pointer fields
...
Allows models like:
```
type User struct {
Id int64
Name string
Email *string `orm:"null"`
}
```
This helps a lot when doing JSON marshalling/unmarshalling.
Pointer fields should always be declared with the NULL orm tag for sanity, this
probably requires documentation.
2014-08-22 14:25:32 +10:00
astaxie
a144769515
update the documents & comments
2014-08-18 16:41:43 +08:00
astaxie
fefd8ddb5b
beego: update licence& fix #669
2014-07-03 23:40:21 +08:00
astaxie
0f170a80da
update the comments fix #658
2014-06-25 10:39:37 +08:00
astaxie
c188cbbcb4
update all files License
2014-05-17 02:26:50 +08:00
astaxie
4245521660
fix #576
2014-05-17 02:26:50 +08:00
slene
65631e0522
fix orm test
2014-03-19 10:00:26 +08:00
slene
95e67ba2c2
orm now support custom builtin types as model struct field or query args fix #489
2014-03-13 23:31:47 +08:00
slene
d5b5c18cf9
orm add GetDB api #433
2014-03-12 15:56:05 +08:00
slene
cacdb3228d
orm add operator between
#518
2014-03-12 15:56:05 +08:00
Daniel Hobe
9f3af59250
add support for sql.Null* types
...
Change instructions for sqlite3 tests to use in memory db for much faster
2014-03-12 15:56:05 +08:00
Kyle McCullough
190039b6f8
Add a ReadOrCreate method:
...
m := &User{Name: "Kyle"}
// Returns a boolean indicating whether the object was created,
// the primary key of the object, or an error.
created, id, err := orm.ReadOrCreate(m, "Name")
2014-01-22 09:15:21 -06:00
slene
95c65de97c
fix #440
2014-01-04 22:30:17 +08:00
slene
61c0b3e286
fix db locked
2013-12-31 09:55:29 +08:00
slene
412a4a04de
#384
2013-12-30 23:04:13 +08:00
slene
1c52f6834a
fix bug in postgres
2013-12-17 16:46:14 +08:00
slene
690d77e985
orm test add extra custom JsonField
2013-11-26 21:34:40 +08:00
slene
bcc8f60677
orm add test about CustomField
2013-11-26 18:32:12 +08:00
slene
e5904443d9
fix #302
2013-11-24 19:29:48 +08:00
bronze1man
ceb4aa9e25
[orm] QueryTable with nil ptr struct
2013-11-24 14:26:32 +08:00
slene
167ad203cb
orm #276
2013-11-08 22:19:01 +08:00
slene
9492e4131b
support reverse m2m relation
2013-11-06 21:08:12 +08:00
slene
a4df6e403c
fix #265
2013-11-01 18:32:03 +08:00