{"repo":"haxetink/tink_sql","free":true,"listed":false,"github":"https://github.com/haxetink/tink_sql","clone":"git clone https://github.com/haxetink/tink_sql.git","description":"SQL embedded into Haxe","language":"Haxe","stars":56,"topics":["sql","haxe","tink","database"],"license":"MIT","category":"databases-storage","readme_excerpt":"Tinkerbell SQL This library embeds SQL right into the Haxe language. Think LINQ (not the syntax sugar, but the framework). Breaking Change (2021-09-16) Transaction is now supported with a minor breaking change. Migration guide: https://github.com/haxetink/tink sql/pull/130#issuecomment-822971910 Motivation Most developers tend to dislike SQL, at least for a significant part of their career. A symptom of that are ever-repeating attempts to hide the database layer behind ORMs, with very limited success. Relational databases are however a very powerful concept, that was pioneered over 40 years ago. Tink SQL has been built to embrace using SQL for your database interactions, but in a type safe way that fits with the Haxe ecosystem. Defining your schema Define a database like so: Redefining table names Connecting to the database Tables API - Table setup - db.User.create(): Promise ; - db.User.drop(): Promise ; - db.User.truncate(): Promise ; - Selecting - db.User.count(): Promise ; - db.User.all(limit, orderBy): Promise ; - db.User.first(orderBy): Promise ; - db.User.where(filter) - db.User.select(f:Fields- Selection ) - Example, select name of user: db.User.select({name: User.name}).where(User.id == 1).first() - Writing - db.User.insertOne(row: User): Promise ; - db.User.insertMany(rows: Array ): Promise ; - db.User.update(f:Fields- Update , options:{ where: Filter, ?max:Int }): Promise ; - Example, rename all users called 'Dave' to 'Donald': db.User.update(function (u) return [u","default_branch":null,"files":null,"tree":[],"storefront":"/r/haxetink","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/haxetink/tink_sql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}