peewee轻量级的python ORM
peewee 是一个轻量级的 python ORM 库。内建对 SQLite、MySQL 和 PostgreSQL 的支持。支持 Python 2.6+ 和 Python 3.2+。
pip 安装:pip install peewee
示例代码:
from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database. >>> from datetime import date >>> uncle_bob = Person(name='Bob', birthday=date(1960, 1, 15), is_relative=True) >>> uncle_bob.save() # bob is now stored in the database 1 >>> grandma = Person.select().where(Person.name == 'Grandma L.').get() >>> grandma = Person.get(Person.name == 'Grandma L.') >>> for person in Person.select(): ... print person.name, person.is_relative ... Bob True Grandma L. True Herb False
高级用法:
import peewee from peewee import * db = MySQLDatabase('jonhydb', user='john',passwd='megajonhy') class Book(peewee.Model): author = peewee.CharField() title = peewee.TextField() class Meta: database = db Book.create_table() book = Book(author="me", title='Peewee is cool') book.save() for book in Book.filter(author="me"): print book.title Peewee is cool
评论
ExposedKotlin 的轻量级 ORM
Exposed是Kotlin实现的轻量级ORM,也是JetBrains和Kotlin官方倾力推荐的ORM。该ORM十分轻量级,只做了底层封装、Dao基础和Model基础,中上层的封装完全没有,可嵌入S
ExposedKotlin 的轻量级 ORM
0
GINO轻量级 Python 异步 ORM 框架
GINO全称为GINOIsNotORM,是一个轻量级Python异步ORM框架,基于 SQLAlchemy core打造。GINO1.0仅支持PostgreSQL(asyncpg)。特性高度融合、超级
GINO轻量级 Python 异步 ORM 框架
0
Just ORM轻量级的Java ORM框架
jorm(JustORM)是一个超轻量级的Java的对象映射框架。主要特性:对象关系映射自动主键生成支持Hibernate支持附加的SQL语句和扩展子查询支持乐观锁提供丰富的SQL语句工具示例代码:
Just ORM轻量级的Java ORM框架
0
u-orm轻量级的ORM框架
u-orm是一个适用、快速、简单、轻量级的JavaORM小型框架,无第三方包依赖,只有一个commons-logging.jar,为了日志输出。整个jar包只有121KB,并封装了很多实用的操作函数,
u-orm轻量级的ORM框架
0