magic.lambda.mssql - Using Microsoft SQL Server from Hyperlambda
This is the Microsoft SQL Server data adapter for Magic. This project allows you to provide a semantic lambda structure to its slots, which in turn will dynamically create a SQL Server dialect SQL statement for you, for all basic types of CRUD SQL statements. In addition, it provides slots to open a SQL Server database connection, and such allows you to declare your own SQL statements, to be executed towards a SQL Server database. Slots this project contains are as follows.
- [mssql.connect] - Connects to a database
- [mssql.create] - Creates a single record in the specified table
- [mssql.read] - Reads multiple records from the specified table
- [mssql.update] - Updates a single record in the specified table
- [mssql.delete] - Deletes a single record in the specified table
- [mssql.select] - Executes an arbitrary SQL statement, and returns results of reader as lambda objects to caller
- [mssql.scalar] - Executes an arbitrary SQL statement, and returns the result as a scalar value to caller
- [mssql.execute] - Executes an aribitrary SQL statement
- [mssql.transaction.create] - Creates a new transaction
- [mssql.transaction.commit] - Explicitly commits an open transaction
- [mssql.transaction.rollback] - Explicitly rolls back an open transaction
Notice - If you use any of the CRUD slots from above, the whole idea is that you can polymorphistically use the same lambda object, towards any of the underlaying database types, and the correct specific syntax for your particular database vendor’s SQL syntax will be automatically generated. This allows you to transparently use the same lambda object, towards any of the database types Magic supports, without having to change it in any ways.
All of the slots in this project are documented in the documentation for the “magic.data.common” project. If you replace the [data.xxx] or [sql.xxx] slots with [mssql.xxx], you will use the SQL Server specific slots, instead of the generic, and/or polymorphistic slots. Hence, please refer to the documentation for “magic.data.common” to see the complete documentation for this project. If you need for instance documentation about the [mssql.connect] slot you should look for the documentation for [data.connect], since it’s more or less the exact same documentation.
Project website for magic.lambda.mssql
The source code for this repository can be found at github.com/polterguy/magic.lambda.mssql, and you can provide feedback, provide bug reports, etc at the same place.
Copyright and maintenance
The projects is copyright of Aista, Ltd 2021 - 2023