[development] Drupal 7 node_example.module
torelad at gmail.com
Tue Aug 25 20:05:10 UTC 2009
I'm working on a Drupal 7 update to the node_example.module. Issue:
I have a working D7 version of node_example.module. Before I post my
replacement candidate I'm hoping for answers to a couple of questions.
If you have a comment, please respond in the issue queue
(http://drupal.org/node/508342) so we retain a record of the
Q1: The Drupal 6 example
provided SQL for creating a database table required for the module.
I've created a .install file and Schema API definition for the module
(for my own testing sanity). Since using schema is best practice, I
would like to include the .install file in the example.
Q2: If the Schema API is used, which database update method is better
for the example: drupal_write_record() (Schema API) or
I've used db_insert and db_update because they seem the best follow-on
from the Drupal 6 example. However, I don't know if this is a
situation where drupal_write_record() is best practice.
Thanks in advance, everyone. Looking forward to feedback in
More information about the development