cdroulers / awesome-sql-builder Goto Github PK
View Code? Open in Web Editor NEWA small library for building SQL queries in a better way than regular string concatenation.
License: GNU Lesser General Public License v3.0
A small library for building SQL queries in a better way than regular string concatenation.
License: GNU Lesser General Public License v3.0
Hello!
This is not exactly a code issue, more like a project one.
You mentioned Awesome.Data.Sql.Builder.OData, and the nuget package for it links to this repo, but I don't see the source for it anywhere.
Is it not public for some reason, or is it just hard to find?
Duh!
column names with '[columnName]'.
Example:
SELECT [Id], [Name], [Age] FROM [Register]
var statement = SqlStatements.Delete()
.From("Users")
.Where("IsCool = TRUE")
.Where("Name LIKE @Query");
var sql = statement.ToSql();
Assert.That(
sql,
SqlCompareConstraint.EqualTo(@"DELETE FROM Users
WHERE
u.IsCool = TRUE AND
u.Name LIKE @Query")
var statement = SqlStatements.Insert(new[] { "Name", "Email" })
.Into("Users")
.FromValues();
var sql = statement.ToSql();
Assert.That(
sql,
SqlCompareConstraint.EqualTo(@"INSERT INTO Users
(
Name,
Email
)
VALUES
(
@Name,
@Email
)")
Probably add something like .FromSelect(SelectStatement select)
!
The where clause is string with field name, operator and value all in one string. Does It uses parameter binding to protect my application against SQL injection attacks?
Or there is need to clean strings being passed? Ideally it should be
Where("FieldName", Equal.To, "Some value")
Hello,
the last commit is almost 2 years ago, are there any plans to continue this project?
var statement = SqlStatements.Update(new[] { "Name", "Email" })
.Table("Users");
var sql = statement.ToSql();
Assert.That(
sql,
SqlCompareConstraint.EqualTo(@"UPDATE Users
SET
Name = @Name,
Email = @Email")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.