Comments (9)
@fulviocanducci no sir, @ahmad-moussawi has been making regular commits and merges but the updates are on the myget feed. I have been tied up with work for a while but catching back up.
I'm sure we will work out a push to nuget soon
from querybuilder.
@ceastwood and @ahmad-moussawi
What would be the command to restart the class Query
?
That?
public override Query NewQuery()
{
return new Query().SetEngineScope(EngineScope);
}
from querybuilder.
I will need to catch up on the execution package; I personally went a different way with query execution but will try to check this for you sometime in the near future.
from querybuilder.
First thanks for your suggestion :), you can use the Clone
method for such cases
var baseQuery = new Query("People");
var q1 = baseQuery.Clone();
// some code here
var q2 = baseQuery.Clone();
// some code here
I don't see this would be really helpful since 1) the compiler should not change/modify the query in any way, 2) such implicit way would really confuse developers
for example, what if I want to compile the same query against multiple compilers ?
var query = new Query("People").Where("Id", 1);
mysql.Compile(query);
sqlsrv.Compiler(query);
pgsql.Compile(query);
from querybuilder.
Good as I had already reported, I am making a package by joining with your package (which is fantastic), it is already in the nuget as beta:
- https://www.nuget.org/packages/Canducci.SqlKata.Dapper/1.0.0-beta-1
- https://www.nuget.org/packages/Canducci.SqlKata.Dapper.MySql/1.0.0-Beta-2
Github Source Code: https://github.com/fulviocanducci/Canducci.SqlKata.Dapper
I saw this need at the time of calling with Dapper, maybe solve this differently, if not every time we have to do it like this:
string cns = "Server=localhost;Database=testdb;Uid=root;Pwd=senha;SslMode=none";
MySqlConnection connection = new MySqlConnection(cns);
var log = connection.Build()
.From("people")
.Insert(new Dictionary<string, object>
{
["name"] = "Pedro c",
["created"] = DateTime.Now.AddDays(-2)
})
.Execute();
var result = connection.Build()
.NewQuery()
.Select("*")
.From("people")
.Query();
The connection.Build()
always creates a new instance, I wish it did not happen.
That is, this gives problem in the second execution
build
.From("people")
.Insert(new Dictionary<string, object>
{
["name"] = "Pedro c",
["created"] = DateTime.Now.AddDays(-2)
})
.Execute(); // ok
build
.Select("*")
.From("people")
.Query(); // problem ...
I accept suggestions. !!!
from querybuilder.
Has the project stopped?
from querybuilder.
For some time this issue has been open, but has not yet been solved, and versions and versions have been released, I ask:
-
Do you think this should not be done?
-
Do you think that putting a method to leave the class at a default value for the generation of a new SQL would not be valid?
-
I would like to have an answer on the issue, so I can make decisions about a package I develop on top of that!
Thank you
from querybuilder.
I'm waiting for this is a pull request about recovering the inserted record!
from querybuilder.
@fulviocanducci, I've already suggested that you can use the Clone
method for such cases.
Could you please elaborate more why this approach does not help in your case ?
from querybuilder.
Related Issues (20)
- Compile query with parameters for ODBC Connection
- Assigning NULL value to column with AsUpdate throws NotSupportedException HOT 1
- db access where day error No value given for one or more required parameters.
- [SQLServer] insert bool value #437 HOT 1
- Possible documentation error
- Distinct AsCount error
- Vulnerability in System.Text.RegularExpressions 4.3.0
- FromRaw can't translate list type parameter properly HOT 1
- how to use include HOT 2
- Question: Combining multiple Statements HOT 1
- Error on WhereContains HOT 1
- Getting Raw SQL from the package, without passing it to the database engine HOT 5
- Error when trying to insert into Always Encrypted column
- SqlServerCompiler Limit generates different query on compile compared to previous versions HOT 3
- Postgres over-escaping ? HOT 2
- `With` missing if defined in sub query HOT 2
- Use RetryProvider in SqlKata.Execution
- [Ignore] atbt discerning Insert/Update
- Next release, 3.0.0 from 2022 year is still beta.
- Method .As("T") not working?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from querybuilder.