Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC_Query のバックエンドを PDO に変更する #354

Open
nanasess opened this issue Dec 18, 2019 · 4 comments
Open

SC_Query のバックエンドを PDO に変更する #354

nanasess opened this issue Dec 18, 2019 · 4 comments
Milestone

Comments

@nanasess
Copy link
Contributor

  • MDB2 から PDO に変更することで保守性を向上する
  • シーケンステーブルの部分は独自に実装する必要がある
  • SQLite3 をサポートできるようになる
@seasoftjapan
Copy link
Contributor

  • シーケンステーブルの部分は独自に実装する必要がある

むしろ独自の仕組みを避けて、DBMS の機能を使ってくれる方が嬉しいかも。
PostgreSQL なら連番型 (serial) 辺り。

たしか、MDB2 を採用する前は、EC-CUBE もそうでしたよね。

現在のシーケンスだと、DB にデータを直接投入するときなど、いちいち面倒で。
使用状況の不明なシーケンスを生じたり。

@nanasess
Copy link
Contributor Author

@seasoftjapan RDBMS の違いを何らかのかたちで吸収できれば、 serial なり autoincrement でもいいと思います👍

@seasoftjapan
Copy link
Contributor

多分、ケアが必要なのは、採番した値の取得ですよね。PostgreSQL や MySQL は、以前のバージョンでできていたので大丈夫な認識ですが、SQLite3 や MS-SQL も類似した機能はありそうです。

以下、実際の動作は試していませんが、ざっと調べた備忘録として。

@nanasess
Copy link
Contributor Author

@seasoftjapan ありがとうございます! 以前のバージョンでは、採番の振舞いを吸収するのに DB_TYPE を if 文で分岐していたので、そうならないように SC_Query のロジック内で吸収したいですね。

@chihiro-adachi chihiro-adachi added this to the 2.17.1 milestone Dec 22, 2019
@ryo-endo ryo-endo modified the milestones: 2.17.1, 2.17.2 Jun 29, 2020
@nanasess nanasess modified the milestones: 2.17.2, 2.17.3 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants