Tuesday, November 26, 2013

PRAGMA Statements

I don't really know what the deal is with the pragma statement but for some reason it automatically placed it when I used the dump command along with the commit statement. I'm assuming it just removes the foreign key restriction judging from what sqlite.org said.

"As of SQLite version 3.6.19, the default setting for foreign key enforcement is OFF. However, that might change in a future release of SQLite. The default setting for foreign key enforcement can be specified at compile-time using the SQLITE_DEFAULT_FOREIGN_KEYS preprocessor macro. To minimize future problems, applications should set the foreign key enforcement flag as required by the application and not depend on the default setting." http://www.sqlite.org/pragma.html

1 comment:

  1. A quick Google search yielded this page:

    https://www.sqlite.org/pragma.html

    On another note, I found a mini ORM (object-relational mapper) called pewee that we should explore soon:

    http://peewee.readthedocs.org

    Happy Thanksgiving!

    ReplyDelete