Flyweight: An ORM for SQLite
github.com
Flyweight: An ORM for SQLite
1–10 of 105 posts
Re: Flyweight: An ORM for SQLite
#2Re: Flyweight: An ORM for SQLite
#3Re: Flyweight: An ORM for SQLite
#4 const fights = await db.fights.get({ cardId: 9, titleFight: true });
translates to
select * from fights where cardId = 9 and titleFight = 1;
Confession: something about ORMs has never clicked with me.. none of them ever seem simpler than SQL.Re: Flyweight: An ORM for SQLite
#5const fights = await db.fights.get({ cardId: 9, titleFight: true }); translates to select * from fights where cardId = 9 and titleFight = 1; Confession: something about ORMs has never clicked with me.. none of them ever seem simpler than SQL.
Nowadays we still use libraries to abstract over SQL dialects and generate SQL in a typesafe and convenient way, but it's not an ORM in the sense that it maps from the object oriented domain into the relational one and back.
Re: Flyweight: An ORM for SQLite
#6const fights = await db.fights.get({ cardId: 9, titleFight: true }); translates to select * from fights where cardId = 9 and titleFight = 1; Confession: something about ORMs has never clicked with me.. none of them ever seem simpler than SQL.
I think it's one reason that I'm leaving at the end of next week.
Re: Flyweight: An ORM for SQLite
#7const fights = await db.fights.get({ cardId: 9, titleFight: true }); translates to select * from fights where cardId = 9 and titleFight = 1; Confession: something about ORMs has never clicked with me.. none of them ever seem simpler than SQL.
Your example is a bit disingenuous. A SQL query isn’t native in most programming languages, so you’re missing a lot more boilerplate code
Re: Flyweight: An ORM for SQLite
#8const fights = await db.fights.get({ cardId: 9, titleFight: true }); translates to select * from fights where cardId = 9 and titleFight = 1; Confession: something about ORMs has never clicked with me.. none of them ever seem simpler than SQL.
for p in Person.objects.raw('SELECT * FROM myapp_person'):
print(p)Re: Flyweight: An ORM for SQLite
#9Re: Flyweight: An ORM for SQLite
#10Flyweight parses SQL statements to generate a TypeScript API, uses convention to automatically map SQL into hierarchical data structures, and combines this with a simple CRUD API.