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
| print(Kid.__mro__) | |
| # (<class '__main__.Kid'>, <class '__main__.Dad'>, <class '__main__.Mum'>, <class 'object'>) | |
| kid = Kid() | |
| print(kid.eye_color) | |
| # blue | |
| print(kid.city) | |
| # Amsterdam | |
| kid.swim() | |
| # I can swim | |
| kid.dance() |
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
| /* | |
| #1 always write datetime values into the database as UTC!!! | |
| -- Reread that last statement | |
| Vertica will store all datetime values as UTC values | |
| */ | |
| -- I highly recommend storing an Integer column of the Day Date | |
| select TO_CHAR(<% DATA_END_TIME %>::DATE - INTEGER '1', 'YYYYMMDD')::INTEGER AS date_id | |
| SELECT CLOCK_TIMESTAMP() "Current Time"; -- return current time | |
| SELECT NOW(); -- time since last session connection (or commit;) which may be an older time than now |
NewerOlder