Commit Graph

374 Commits

Author SHA1 Message Date
Taylor Otwell ba4d1a89c8 Removed add_ magic method from eloquent model as this will be a 3.2 feature. 2012-03-26 10:56:42 -05:00
Daniel Bondergaard 3639d2c46f Fixed pivot model hydration loading in Eloquent2
Signed-off-by: Daniel Bondergaard <danielboendergard@gmail.com>
2012-03-26 14:17:49 +02:00
Taylor Otwell 57cf817de4 Fix pivot constraints on ->pivot() method of many-to-many.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-22 21:47:35 -05:00
Taylor Otwell 879e56df75 Merge branch 'master' into develop 2012-03-22 21:26:32 -05:00
Taylor Otwell e96f75e8cc Fixing bugs in database layer. 2012-03-22 13:12:27 -05:00
Taylor Otwell b6615ddbee Fixing a few things in Eloquent 2. 2012-03-22 11:00:13 -05:00
Phill Sparks d1de7b9ffe Fix named keys on Schema columns.
Signed-off-by: Phill Sparks <me@phills.me.uk>
2012-03-22 14:27:37 +00:00
Taylor Otwell 268e6e460d Updating $eloquent->dirty() method. 2012-03-22 09:18:11 -05:00
Taylor Otwell e5b3b196ab Updated change-log. Prepend table names to default index names in schema. 2012-03-22 09:11:51 -05:00
Taylor Otwell 453d4154f2 Added "pivot" method to has_many_and_belongs_to. 2012-03-22 09:07:21 -05:00
Taylor Otwell 0961f8f766 Fixing eloquent 2 query->first method. 2012-03-21 22:00:30 -05:00
Taylor Otwell 30204e082b Fixing bugs in eloquent relating to namespaces. 2012-03-21 15:45:05 -05:00
Taylor Otwell bb2f458304 Added "add_" magic method to eloquent model. 2012-03-21 14:23:46 -05:00
Taylor Otwell afb33c1775 Fix bug with table prefix and columns. 2012-03-21 13:10:59 -05:00
Taylor Otwell 91a6cb882e Added wrap_value function to grammar. 2012-03-21 12:06:31 -05:00
Taylor Otwell 0893f3cca6 Merge branch 'master' into develop 2012-03-21 10:59:35 -05:00
Taylor Otwell 43212f8505 Fix bug in eloquent model. 2012-03-21 10:38:39 -05:00
Taylor Otwell ce9f4f1db7 Added support for on_delete and on_cascade of foreign keys. 2012-03-21 10:33:06 -05:00
Taylor Otwell 4336bb885a Fix attribute retrieval bug in Eq2. 2012-03-20 11:43:11 -05:00
Taylor Otwell 079400ff3d Allow passing in a model instance to relationship insert / update methods. 2012-03-20 09:03:31 -05:00
Taylor Otwell e540fd3b6d Automatically detect eloquent table names. 2012-03-19 14:11:11 -05:00
Taylor Otwell d80730cf0d Removed transaction method from Eloquent model since it is made pointless by DB::transaction. 2012-03-19 08:43:07 -05:00
Anton Khodakivskiy 1044367c1e added default values to the signature of Query::left_join to allow closure-based join conditions 2012-03-19 07:47:20 -04:00
Taylor Otwell 0455438ebe Added transaction method to database connection and eloquent model. 2012-03-18 22:39:04 -05:00
Taylor Otwell fcff36a0ac Added related model updating from belongs_to relationship. 2012-03-17 23:14:01 -05:00
Taylor Otwell 68b4e55336 Cleaning up code.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-17 16:12:26 -05:00
Taylor Otwell 8c209a7a61 Just cleaning up some code.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-17 15:42:01 -05:00
Taylor Otwell 762f2402c3 Fixing bugs and improving.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 15:32:26 -05:00
Taylor Otwell b5e75f6fcf Fixing bugs and improving.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 14:08:28 -05:00
Taylor Otwell dc92dd264d Adding auto detection of intermediate table names.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 13:01:48 -05:00
Taylor Otwell c3d95122e4 Fixing bugs… adding better pivot support.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 11:29:21 -05:00
Taylor Otwell c9c0ddf569 Fixing bugs in Eq2.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 10:29:43 -05:00
Taylor Otwell d6d667af90 Added Eloquent 2.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 08:37:31 -05:00
Taylor Otwell 3de0d1af66 Make the query where_nested method public.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-15 16:12:18 -05:00
Taylor Otwell afcb60ec60 Adding comment in database grammar.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-12 10:31:12 -05:00
Kelly Banman 17f7389bc5 Fix prefixing raw tables 2012-03-09 08:48:20 -08:00
Taylor Otwell 6f7780a0f8 Merge branch 'refs/heads/master' into develop 2012-03-07 14:13:01 -06:00
Shawn McCool 17ac74d7f8 made all sqlite fields nullable to fix various problems with the difference in sqlite's null functionality 2012-03-07 20:52:17 +01:00
Taylor Otwell 46595ce55e Unsigned only supported by MySQL.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-04 14:28:49 -06:00
Taylor Otwell f3df013753 Added support for decimal data type in schema.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-04 14:23:59 -06:00
Taylor Otwell d43157b61f Fix drop_foreign SQL grammar for MySQL.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-02 10:27:37 -06:00
Taylor Otwell 1d93cab0d0 Cleaning up foreign key support. Added drop_foreign command.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-02 10:23:27 -06:00
Taylor Otwell c002ae6337 Use constraints for "unique" on Postgres schemas.
Previous was using CREATE INDEX, should be using ADD CONSTRAINT as this will create the index automatically per Postgres documentation.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-02 09:54:43 -06:00
Taylor Otwell 1302ded5f8 Added foreign key support to schema builder for MySQL, Postgres, and SQL Server.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-02 09:41:30 -06:00
Colin Viebrock b7d068f2f2 Move method into grammar.php instead of duplicating in each grammar 2012-02-29 15:21:20 -06:00
Colin Viebrock 26c7273493 Add unsigned() modifier, so you can create unsigned integer columns 2012-02-29 15:09:13 -06:00
Taylor Otwell 621fee09be cleaning up code.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-02-27 09:28:21 -06:00
Taylor Otwell 484a737382 make the pdo fetch style configurable. 2012-02-24 11:35:02 -06:00
Taylor Otwell 9804bb55dc comment cleanup. 2012-02-24 11:17:56 -06:00
Taylor Otwell f6ef233d39 alias aggregate column in query grammar. 2012-02-21 09:23:24 -06:00
Taylor Otwell fe0b4b287d cleaning up code. 2012-02-17 16:30:11 -06:00
Taylor Otwell 3507d15323 fix charset in mysql and pgsql connectors. 2012-02-17 14:38:25 -06:00
Taylor Otwell faa2eec3b9 consolidate database methods into db::query. 2012-02-17 08:47:06 -06:00
Taylor Otwell e828b6c0c3 all database exceptions now include SQL and bindings in message for easier debugging. 2012-02-16 22:32:09 -06:00
Taylor Otwell dd6402c648 prefix built-in events with laravel. 2012-02-16 16:26:39 -06:00
Taylor Otwell 0e63717be9 use default index names on implicit indexes. 2012-02-16 15:37:06 -06:00
Taylor Otwell 317e8db81f change query event name. 2012-02-16 09:08:00 -06:00
Taylor Otwell 36834c1118 add database.profile config option. 2012-02-16 08:46:48 -06:00
Taylor Otwell b29f8a88fe add default value for index names. 2012-02-15 16:17:47 -06:00
Taylor Otwell ab17ea674a fix bug in db profiling. 2012-02-15 13:29:37 -06:00
Taylor Otwell 479b3f6773 cleaning up various codes. 2012-02-13 23:51:33 -06:00
Taylor Otwell 620f3ba91f fixing a bug and cleaning. 2012-02-12 21:52:28 -06:00
Taylor Otwell b0a223aa4b cleaning up comment. 2012-02-12 21:27:07 -06:00
Taylor Otwell 0f2d311739 cleaning up some code. 2012-02-12 16:34:11 -06:00
Taylor Otwell 3a92facc76 updated routing to fix several issues. 2012-02-12 14:48:36 -06:00
Taylor Otwell 490eb0f5bf remove die. 2012-02-08 11:35:29 -06:00
Taylor Otwell 5e59a72b5b fix bug in paginator. 2012-02-08 11:16:55 -06:00
Taylor Otwell e88d2213ab added support for complex joins on query builder. 2012-02-08 10:53:58 -06:00
Taylor Otwell 0c133dd96c trimming comment. 2012-02-06 23:02:49 -06:00
Taylor Otwell 8240b2ffd1 move shortcut method into grammar. 2012-02-06 22:09:15 -06:00
Taylor Otwell 087f50a52c cast bindings to array. 2012-02-06 21:39:30 -06:00
Taylor Otwell 1351a2b189 cleaning up code. 2012-02-06 20:19:29 -06:00
Taylor Otwell bbae90adad fix pagination comment. 2012-02-06 15:57:37 -06:00
Taylor Otwell cd17761f72 fix distinct problems in paginator. 2012-02-06 15:28:03 -06:00
Taylor Otwell 2e492a710a Merge pull request #308 from sparksp/patch-3
SQLServer::limit and ::offset return strings
2012-02-04 18:00:21 -08:00
Phill Sparks 8e5a143bbe SQLServer::limit and ::offset return strings 2012-02-04 21:33:25 +00:00
Phill Sparks 62072e5281 PHPDoc fixes 2012-02-04 21:30:52 +00:00
Taylor Otwell 3c016285a1 make log function non-static. 2012-02-01 08:27:46 -06:00
Taylor Otwell 982e009a96 added query event for hooking into database for logging. 2012-02-01 08:25:54 -06:00
Taylor Otwell ea13ddfb7f fix aggregate selecting bug. 2012-01-30 10:38:12 -06:00
Taylor Otwell 1ec6fc766c added support for database table prefixes. 2012-01-29 13:07:15 -06:00
Taylor Otwell 97fcea1e51 cleaned up paths. 2012-01-28 14:55:08 -06:00
Taylor Otwell f44c565ee4 converted path constants to $GLOBALS. 2012-01-27 16:17:43 -06:00
Taylor Otwell d4c5114792 code quality and backreference support in controllers. 2012-01-25 16:07:16 -06:00
Taylor Otwell ae56f68c87 use query grammar to parameterize where in sql shortcut. 2012-01-25 15:34:19 -06:00
Taylor Otwell 27fdb1e3f5 added key and session tasks. 2012-01-24 15:02:51 -06:00
Taylor Otwell 70dd657e80 make aggregate method public. 2012-01-24 13:36:22 -06:00
Taylor Otwell 67696d8114 index names may be specified on fluent setup. 2012-01-24 08:43:12 -06:00
Taylor Otwell 3569edbb0b fixed comment in grammar. 2012-01-21 10:46:03 -06:00
Taylor Otwell 4737c6d8a9 Merge pull request #244 from codler/patch-7
DB::raw should have higher precedence than alias
2012-01-21 08:45:09 -08:00
Taylor Otwell e41657c4d1 do not check for existence of sqlite database before connecting. 2012-01-21 10:39:54 -06:00
Taylor Otwell dd8ebe60f0 make index names required. 2012-01-21 10:36:39 -06:00
Han Lin Yap b158a7a438 DB::raw higher precedence than alias 2012-01-17 17:25:51 +01:00
Taylor Otwell b5442c67fc merged skunkworks into develop. 2012-01-16 13:59:24 -06:00
Taylor Otwell 59fcd67637 Merge pull request #214 from akuzemchak/develop
Allow timestamp method to be extended
2011-12-30 09:29:48 -08:00
Han Lin Yap 4b3965e461 Fix bug when using raw_where with eloquent 2011-12-27 11:35:37 +01:00
Han Lin Yap 4a52aabd15 Fix bug when using raw_where with eloquent 2011-12-27 11:34:15 +01:00
Aaron Kuzemchak 81992a18fd Changed timestamp method to protected, so that it can be extended if desired. 2011-12-18 16:14:26 -05:00
Taylor Otwell ddd6d44782 fix bug affecting using db::raw with eloquent. 2011-12-10 21:54:07 -06:00
Taylor Otwell 4ec3f397cf fixed pagination bug affecting postgres. 2011-12-04 16:51:11 -06:00
Han Lin Yap 287433193d phpdoc correction 2011-12-04 15:00:14 +01:00
Taylor Otwell a6bb5f26a3 Trim exception message in database manager. 2011-11-23 08:35:47 -06:00
Taylor Otwell 937441d31b cleaning up more code. 2011-11-21 22:22:41 -06:00
Taylor Otwell e55f9e9fad Added a helpful comment regarding expressions. 2011-11-18 14:50:11 -06:00
Phill Sparks 58638216e8 Throw better Exceptions 2011-11-15 12:35:04 +00:00
Taylor Otwell 9281f04cdd minor refactorings. 2011-11-11 23:15:17 -06:00
Taylor Otwell b6ab0b08ce moving some laravel classes around, switching alias to reflect changes. added some factories. removed system ioc container config file. 2011-11-11 21:27:30 -06:00
Taylor Otwell 9e9ee931b5 moved session class. 2011-11-09 21:55:21 -06:00
Taylor Otwell e8561ca905 Clean up the MySQL database connector. 2011-11-07 13:35:00 -06:00
Taylor Otwell 05902d22d4 Cleaning up the Postgres connector. 2011-11-07 13:32:31 -06:00
Taylor Otwell f46a3deab6 Clean-up the default database grammar. 2011-11-07 13:24:22 -06:00
Taylor Otwell 9caf239f6b various refactorings. 2011-11-02 21:27:43 -05:00
Taylor Otwell c3c0fbce96 Fix bug in update database grammar. 2011-11-01 08:34:00 -05:00
Taylor Otwell 7bf84066bf refactoring. added redis drivers. 2011-10-26 21:21:31 -05:00
Taylor Otwell 32989d39c8 some small refactorings and cleanup. 2011-10-22 23:25:07 -05:00
Taylor Otwell b71ecb4363 removed packages directory. refactoring. 2011-10-21 21:49:33 -05:00
Taylor Otwell 21dccae755 refactor sqlite connector to accept path in constructor. 2011-10-20 22:17:40 -05:00
Taylor Otwell af36cb3d5a various refactoring and tweaks. 2011-10-20 21:44:18 -05:00
Taylor Otwell df9130dafa refactoring and working on redis. 2011-10-19 22:44:02 -05:00
Taylor Otwell 9fc9f88a41 refactoring various pieces of the framework. 2011-10-18 20:19:36 -05:00
Taylor Otwell 48f1879b9f tweaking comments in sqlite connector. 2011-10-15 23:33:26 -05:00
Taylor Otwell 87e8dbeb32 refactoring database query class. 2011-10-15 23:25:18 -05:00
Taylor Otwell 893acd8743 tweaking and refactoring the database connectors. added connectors to the container. 2011-10-15 23:20:13 -05:00
Taylor Otwell 2b93963f34 removed unnecessary namespace import from eloquent model. 2011-10-15 14:19:33 -05:00
Taylor Otwell a6eaa06981 refactoring routing and comments. 2011-10-15 14:04:11 -05:00
Taylor Otwell 9f7ed576c5 allow eloquent models to use increment and decrement. 2011-10-12 21:35:23 -05:00
Taylor Otwell 9bf978abcd added decrement method to query builder. 2011-10-12 21:32:06 -05:00
Taylor Otwell 559785f168 added increment method to query builder. 2011-10-12 21:27:29 -05:00
Taylor Otwell 68455378cc added support for database expressions. 2011-10-12 19:55:44 -05:00
Taylor Otwell 8846110e8d refactored and prettified the default database grammar. 2011-10-11 22:45:19 -05:00
Taylor Otwell 7317b5857b refactored welcome pages. 2011-10-11 21:27:16 -05:00
Taylor Otwell 392caeed91 refactoring formatting. 2011-10-10 21:43:30 -05:00
Taylor Otwell 2c2dcdc502 Merge pull request #99 from sparksp/aeae2c8476523f1551825afcc17323c4b88d22c5
Secure extracts
2011-10-05 21:26:35 -07:00
Taylor Otwell 71b0ab8b8d refactoring container for speed. 2011-10-05 18:32:48 -05:00
Taylor Otwell 52b68c060b refactoring. adding back pagination. 2011-10-04 21:43:39 -05:00
Phill Sparks aeae2c8476 Secure extracts
Updated extract calls to use EXTR_SKIP.
2011-10-04 13:11:11 +01:00
Taylor Otwell 16575246af bug fixes. 2011-10-02 22:44:36 -05:00
Taylor Otwell 14186a00e0 refactoring and bug fixes. 2011-09-29 21:22:48 -05:00
Taylor Otwell 1fb70a8568 cleaning up sqlite connector. 2011-09-28 22:49:20 -05:00
Taylor Otwell 7018b85b4a cleaning up eloquent models. 2011-09-28 22:47:24 -05:00
Taylor Otwell 2ac5a37291 cleaning up eloquent models. 2011-09-28 22:47:05 -05:00
Taylor Otwell 9c319ba0fc refactoring database layer. 2011-09-28 21:43:11 -05:00
Taylor Otwell c6f9734603 refactoring. 2011-09-27 21:10:32 -05:00
Taylor Otwell 4525eae25a revert back to more sensible architecture. 2011-09-20 23:14:09 -05:00
Taylor Otwell 7898094e25 clean up a few more things. 2011-09-17 23:55:36 -05:00
Taylor Otwell cb5a426cba added database connectors and cleaned up configuration. 2011-09-17 23:46:24 -05:00
Taylor Otwell c3f5abc37a fixed bug in database manager. 2011-09-16 20:02:22 -05:00
Taylor Otwell 77dc8d2014 refactoring various things. 2011-09-16 19:59:20 -05:00
Taylor Otwell 917d4cb1e4 testing database. 2011-09-15 23:03:47 -05:00
Taylor Otwell 5a9696da77 refactoring session for better architecture. 2011-09-15 20:23:30 -05:00
Taylor Otwell 5196d015b8 fixed merge conflicts. 2011-09-14 20:58:27 -05:00
Taylor Otwell c576c388b9 added support for sequence to eloquent models. 2011-09-14 00:15:05 -05:00
Taylor Otwell 8688270f22 fixed database bugs. 2011-09-13 23:47:38 -05:00
Taylor Otwell 15449c34b1 refactoring database layer. 2011-09-13 23:04:28 -05:00
Taylor Otwell cd609d9b39 refactoring database layer. 2011-09-12 23:57:53 -05:00
Taylor Otwell ca8883d727 refactoring database connection. 2011-09-12 23:52:43 -05:00
Taylor Otwell 68b0d29110 fix namespacing issue. 2011-09-12 23:34:23 -05:00
Taylor Otwell 9d56d4aa4e more database simplifications 2011-09-12 23:33:42 -05:00
Taylor Otwell 59a7e47f82 simplified database connection configuration. 2011-09-12 23:14:24 -05:00
Taylor Otwell 045858d88d refactoring the database layer. 2011-09-12 21:48:48 -05:00
Taylor Otwell b8a901c792 adding better comments to database classes. 2011-09-11 23:58:19 -05:00
Taylor Otwell 2521ab3c1d refactoring the database layer. 2011-09-11 23:25:31 -05:00
Taylor Otwell 70b6cc5994 refactoring. 2011-09-06 22:26:14 -05:00
Taylor Otwell 7eef380d8a more refactoring and dependency injection. 2011-09-06 22:04:52 -05:00
Taylor Otwell 3e874867b8 database refactoring for dependency injection and other general refactoring. 2011-09-04 21:45:37 -05:00
Taylor Otwell cd395c2638 tweaking facades. 2011-09-03 23:46:52 -05:00
Taylor Otwell 2d170e2314 added more facades. 2011-09-03 23:05:06 -05:00
Taylor Otwell 7518088ffe use service location in eloquent models to resolve the database manager. 2011-09-02 20:10:35 -05:00
Taylor Otwell 6281c8c360 more refactoring for dependency injection. 2011-09-02 19:36:19 -05:00
Taylor Otwell 9be3d1a54b refactoring the view classes. 2011-08-29 00:07:10 -05:00
Taylor Otwell 1e49001dfc continued ioc refactoring. 2011-08-26 21:42:04 -05:00
Taylor Otwell d65ddb53a8 fix bug in query class. 2011-08-25 23:46:45 -05:00
Taylor Otwell e0a9f57515 fixed database namespacing. 2011-08-25 23:12:30 -05:00
Taylor Otwell 1e7850d9ba refactoring for dependency injection and testability. 2011-08-25 22:53:05 -05:00