Skip to content

Conversation

@pmoust
Copy link
Contributor

@pmoust pmoust commented Nov 23, 2013

Removed duplicate code that provides batchInsert() for MySQL, CUBRID, PostreSQL, SQL Server

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling d1e3a73 on pmoust:traits into 7b0ba10 on yiisoft:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling f700a83 on pmoust:traits into 7b0ba10 on yiisoft:master.

@pmoust
Copy link
Contributor Author

pmoust commented Nov 23, 2013

Added it for PostgreSQL as well, since multiple rows insertion support was added for years.

I am wondering if we should add it for sqlite as well since it is support since http://sqlite.org/releaselog/3_7_11.html - relatively recent. (thanks to @nineinchnick for pointing that out on #yii)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.24%) when pulling c4bb12f on pmoust:traits into 7b0ba10 on yiisoft:master.

@pmoust
Copy link
Contributor Author

pmoust commented Nov 23, 2013

IMHO, let's not add this Trait for sqlite, as in most environments in my experience <=3.6.20 is used still.
The old select 1 union select 2 etc an be used.

I am done with this PR, feel free to merge.

@qiangxue qiangxue closed this in 69fa7ba Nov 24, 2013
@qiangxue
Copy link
Member

Instead of using trait, I moved batchInsert to base class. If a child class doesn't support this, it can simply throw NotSupportedException.

@pmoust pmoust deleted the traits branch November 24, 2013 13:00
cebe added a commit that referenced this pull request Nov 24, 2013
* master:
  Fixes #1253
  Fixes #1310: ActiveRelation does not preserve order of items on find via() and viaTable()
  fixed limit/offset for sqlite,mysql and cubrid
  fixed test break.
  Fixed test break.
  Fixes #1301: fixed scenario generation when there are "except" scenarios.
  support for batch insert in sqlite older than 3.7.11
  Fixes #1298: supporting route with trailing slash.
  Fixes #1296: stricter check of dashes in route.
  Fixes #1307: move batchInsert() to base class.
  Update apps-advanced.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants