This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Create a situation where a unique index error will occur. Try to save the | |
| * object again after making the relevant field unique. Expected behavior: | |
| * object saves second (or third...) time and we wind up with ten objects. Actual behavior: | |
| * we get just one object and there is a unique index error after all ten save callbacks | |
| * have already been invoked "successfully"! This is really strange, even stranger than I | |
| * thought. Maybe the index is not applied yet somehow and I need to wait on the schema | |
| * being ready? | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $file = dirname(__FILE__) . '/profile.csv'; | |
| $out = fopen($file, 'a'); | |
| $load = @file_get_contents('/proc/loadavg'); | |
| $load = preg_split('/ /', $load); | |
| $load = $load[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I'm going to examine a plausible, nontrivial query that comes up for client sites and | |
| consider how it would be implemented in both MongoDB and a MySQL back end that attempts | |
| to support a lot of the capabilities we like in MongoDB. | |
| I'm not going to look at how we retrieve the inner contents of a page (nested contents) | |
| or information about subpages (related contents) because I have a pretty good idea how | |
| we want to cope with those bits in both cases. | |
| The query syntax here is just pseudocode, I'm not proposing it: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| templates: | |
| home: | |
| areas: | |
| header | |
| body | |
| footer | |
| slots: | |
| splash: | |
| type: aImage | |
| logo: |
NewerOlder