Commit Graph

1456 Commits

Author SHA1 Message Date
Jinzhu 0cba662be0 Add method QuotedTableName for Scope 2014-06-03 17:17:30 +08:00
Jinzhu 2fff8a7fac Revert "quote table name"
This reverts commit 38a06bfdaa.
2014-06-03 17:16:34 +08:00
Jinzhu a77ee01cec Merge pull request #127 from vgarvardt/master
Multicolumn index and unique index
2014-06-01 19:50:28 +08:00
Vladimir Garvardt d1dc0ccbef AddUniqueIndex 2014-06-01 02:35:56 +04:00
Vladimir Garvardt cdce84fd1a AddIndex for multiple columns 2014-06-01 02:26:17 +04:00
Jinzhu 38a06bfdaa quote table name 2014-05-24 09:54:17 +08:00
Jinzhu 2f8b1842d8 Merge pull request #112 from siesta/timenowset
set updated_at and created_at with the same timestamp
2014-05-12 18:27:13 +08:00
Cihangir SAVAS c465d3214f set updated_at and created_at with the same timestamp, prevent record from having slight difference between fields 2014-05-12 12:52:47 +03:00
Jinzhu 452123479e Remove sql string's validation check 2014-04-30 11:53:07 +08:00
Jinzhu ddc1f9156a Fix insert empty record into database 2014-04-29 17:42:10 +08:00
Jinzhu 1120451108 Use sqlite as default test database 2014-04-29 16:02:18 +08:00
Jinzhu a16a5fca58 Only mark those SQL strings has as invalid SQL 2014-04-29 15:51:49 +08:00
Jinzhu 3264b82368 Fix auto migration for sqlite 2014-04-29 15:39:06 +08:00
Jinzhu 514a32e547 Fix imported package name 2014-04-29 15:21:43 +08:00
Paolo Galeone cc3ebd34de Add support to fields with double quotes 2014-04-28 22:37:45 +02:00
Jinzhu d6d83b0cde Fix invalid SQL issue 2014-04-28 16:52:01 +08:00
Jinzhu 6dc332e04d Include table_schema when query from INFORMATION_SCHEMA for mysql 2014-04-25 09:26:10 +08:00
Jinzhu 66e6c9af9f Add method HasTable, HasColumn to dialect 2014-04-25 09:08:48 +08:00
Jinzhu 288c8e37af Merge branch 'sunfmin-master'
Conflicts:
	main.go
2014-04-25 07:23:26 +08:00
Jinzhu a46d149579 remove package dialect for easier contribution 2014-04-25 07:20:23 +08:00
Felix Sun 1ff3c79c75 When multiple databases have the same table name and column names, automigrate doesn't work 2014-04-25 00:39:38 +08:00
Jinzhu fd3ce3b39a Add method to close gorm db connection 2014-04-24 10:55:17 +08:00
Jinzhu 8e3181494d Merge pull request #92 from bruston/patch-1
fix minor grammar issues and broken header link in README.md
2014-04-20 08:30:34 +08:00
Benjamin Ruston 14ea47c280 fix minor grammar issues and broken header link in README.md 2014-04-19 13:04:56 +01:00
Jinzhu 65137121ff Merge pull request #90 from xdmnl/master
Fix ORDER BY "id" is ambiguous
2014-04-11 16:19:46 +08:00
Xavier Dumesnil 2b7306aca1 Fix typos 2014-04-11 09:58:23 +02:00
Jinzhu 0c5e401e1e Merge pull request #89 from dukex/patch-1
fixed example code
2014-04-11 09:55:24 +08:00
Xavier Dumesnil 5e62e7fdad Include scope.TableName() in ORDER statement for First() & Last() 2014-04-10 16:29:09 +02:00
Duke 98e9670b8e fixed example code 2014-04-10 03:49:00 -03:00
Jinzhu 1a5a4b707d Use offical gorm package in tests 2014-04-06 18:04:10 +08:00
Paolo Galeone bcb1ca67c0 Add support for primary key different from id 2014-04-06 04:10:45 +02:00
Jinzhu 22cf9719bf update test 2014-03-26 11:02:17 +08:00
Jinzhu 663c06cfb1 Add test for anonymous scanner 2014-03-26 10:31:02 +08:00
Jinzhu 1949baf5c8 Test Related with search conditions 2014-03-26 08:48:40 +08:00
Jinzhu d7d9e24e1e Add test for anonymous field 2014-03-26 08:36:17 +08:00
Jinzhu 6d48c9357d Merge pull request #77 from tstranex/master
Add DB.Tx() method to provide access to the underlying sql.Tx instance.
2014-03-17 19:45:14 +08:00
Timothy Stranex 42448cb5d6 Add DB.CommonDB() instead of DB.Tx(), as discussed in the PR thread. 2014-03-17 12:08:44 +02:00
Timothy Stranex a336f51444 Add DB.Tx() method to provice access to the underlying sql.Tx instance. 2014-03-16 18:24:32 +02:00
Jinzhu d232c69369 Fix exception in mysql 2014-03-16 10:57:38 +08:00
Jinzhu e6c953dd4c Support custom types from base types 2014-03-16 09:58:32 +08:00
Jinzhu 4969fc9cb5 Remove unused Scanner type from dialect 2014-03-16 07:50:57 +08:00
Jinzhu dc2f27401e Test search data using time with zone 2014-03-15 10:41:12 +08:00
Jinzhu 844a0ddfcc update tests for time with zone 2014-03-15 10:31:26 +08:00
Jinzhu 7bbf71fb29 Add tests to make sure time with zone won't be changed after save 2014-03-15 10:17:43 +08:00
Jinzhu 65e594e2d6 Fix README 2014-03-15 09:05:08 +08:00
Jinzhu 1086009fce Check if value is struct before check Field 2014-03-11 10:09:16 +08:00
Jinzhu 24d527670b Use the same database for Related 2014-03-07 19:08:33 +08:00
Jinzhu 0156c26cfa Merge pull request #64 from fuzzac/master
Fixed double logging of UPDATE and DELETE commands.
2014-02-21 10:29:23 +08:00
unknown dfb75dc79d Fixed double logging of UPDATE and DELETE commands. 2014-02-19 14:51:14 -08:00
Jinzhu 2c33502503 Add tests for updated_at will be updated when update value with Assign 2014-02-18 10:03:14 +08:00