一个简单、有效但不可执行的策略是使用 MySQL 事务。我们有一个小团队和一个小型开发服务器,这对我们来说效果很好。如果您有一个数据库包装类(或类似的类),您可以让它在创建时开始事务,并在销毁时回滚。显然,有人可以在那里调用 commit,或者手动打开连接,但这确实有帮助。小型开发团队可能可以使用这种策略,仅此而已,因为很容易将模式传达给新的团队成员。
A simple, effective, but unenforceable tactic is to use a MySQL transaction. We have a small team and a small development server, and this has worked well for us. If you have a database wrapper class (or something of the like), you can have it begin the transaction when it is created, and have it rollback when it destructs. Obviously, someone could call commit in there, or manually open up a connection, but it does help. Small development teams can probably use this tactic and nothing more, as it is easy to communicate the pattern to new team members.
发布评论
评论(1)
一个简单、有效但不可执行的策略是使用 MySQL 事务。我们有一个小团队和一个小型开发服务器,这对我们来说效果很好。如果您有一个数据库包装类(或类似的类),您可以让它在创建时开始事务,并在销毁时回滚。显然,有人可以在那里调用 commit,或者手动打开连接,但这确实有帮助。小型开发团队可能可以使用这种策略,仅此而已,因为很容易将模式传达给新的团队成员。
A simple, effective, but unenforceable tactic is to use a MySQL transaction. We have a small team and a small development server, and this has worked well for us. If you have a database wrapper class (or something of the like), you can have it begin the transaction when it is created, and have it rollback when it destructs. Obviously, someone could call commit in there, or manually open up a connection, but it does help. Small development teams can probably use this tactic and nothing more, as it is easy to communicate the pattern to new team members.