peewee Documentation Release 3.6.0
For example code, check out the source code for the HStoreField, in playhouse.postgres_ext. Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() schemas that may have used awkward naming conventions: class UserProfile(Model): class Meta: table_name = 'user_profile_tbl' If you wish to implement your own naming convention, you can specify the 51. # 2 1. 52. # 2 3. 55. # 3 100 155. Peewee uses these rules for determining what frame-type to use: If the user specifies a frame_type, that frame type will0 码力 | 377 页 | 399.12 KB | 1 年前3peewee Documentation Release 3.6.0
For example code, check out the source code for the HStoreField, in playhouse.postgres_ext. Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() This feature can be useful for dealing with pre-existing database schemas that may have used awkward naming conventions: class UserProfile(Model): class Meta: table_name = 'user_profile_tbl' 1.6. Models Models and Fields 53 peewee Documentation, Release 3.6.0 If you wish to implement your own naming convention, you can specify the table_function Meta option. This function will be called with your model class0 码力 | 302 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Field-naming conflicts Creating model tables Model options and table metadata Indexes and Constraints Non-integer For example code, check out the source code for the HStoreField, in playhouse.postgres_ext. Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.5.0
For example code, check out the source code for the HStoreField, in playhouse.postgres_ext. Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name depending on the value of the scope. Ensure parentheses are used appropriately. scope (int) – The scope rules to be applied while the state is active. parentheses (bool) – Wrap the contained SQL in parentheses0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.5.0
For example code, check out the source code for the HStoreField, in playhouse.postgres_ext. Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() add([ Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name of the scope. • Ensure parentheses are used appropriately. Parameters • scope (int) – The scope rules to be applied while the state is active. • parentheses (bool) – Wrap the contained SQL in parentheses0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.3.0
example code, check out the source code for the HStoreField, in playhouse.postgres_ext. 1.7.2 Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() add([ Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name API Documentation 175 peewee Documentation, Release 3.3.0 Parameters • scope (int) – The scope rules to be applied while the state is active. • parentheses (bool) – Wrap the contained SQL in parentheses0 码力 | 280 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
example code, check out the source code for the HStoreField, in playhouse.postgres_ext. 1.7.2 Field-naming conflicts Model classes implement a number of class- and instance-methods, for example Model.save() add([ Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name of the scope. • Ensure parentheses are used appropriately. Parameters • scope (int) – The scope rules to be applied while the state is active. • parentheses (bool) – Wrap the contained SQL in parentheses0 码力 | 284 页 | 1.03 MB | 1 年前3peewee Documentation Release 3.0.0
Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name value of the scope. Ensure parentheses are used appropriately. Parameters: scope (int) – The scope rules to be applied while the state is active. parentheses (bool) – Wrap the contained SQL in parentheses recursive descent and introspection of scope and state. scope Return the currently-active scope rules. parentheses Return whether the current state is wrapped in parentheses. subquery Return whether0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.1.0
Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name depending on the value of the scope. Ensure parentheses are used appropriately. scope (int) – The scope rules to be applied while the state is active. parentheses (bool) – Wrap the contained SQL in parentheses recursive descent and introspection of scope and state. scope Return the currently-active scope rules. parentheses Return whether the current state is wrapped in parentheses. subquery Return whether0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 2.10.2
Student.get(Student.name == 'Charlie'), Student.get(Student.name == 'Zaizee')]) # The same rules apply for removing items from a many-to-many: huey.courses.remove(Course.select().where(Course.name0 码力 | 275 页 | 276.96 KB | 1 年前3
共 11 条
- 1
- 2