Questions tagged [sqlbuilder]

SqlBuilder is designed to make dynamic SQL tasks easier.

DbExtensions: https://maxtoroq.github.io/DbExtensions/docs/SqlBuilder.html

Laravel 4: https://www.npmjs.com/package/sqlbuilder

Open HMS: https://openhms.sourceforge.io/sqlbuilder/

44 questions
2
votes
1 answer

JAVA How to build a sql query with JOOQ step by step

In my Java code, I want to create a long query, I find JOOQ to build query and I use it without generation class but I don't find the way to build my query step by step like this: DSLContext request = DSL.using(sqlConnection,…
dada17xs
  • 180
  • 1
  • 11
1
vote
4 answers

Question mark placeholder

How can I replace all '?' the variables? Something like: $name = 'test' ; $lname = 'lastTest'; $id = 1 ; ->where ( 'customers.name = ? and customers.lastname = ? and customers.id = ?' , $name , $lname , $id ) ; output: customers.name…
user862010
1
vote
1 answer

SqlBuilder returning wrong result

I have a query using Npgsql and Postgres. For building my query I am using Dapper and its SqlBuilder. When I make the normal statement in the DB it is returning the correct result. When I am doing it via the SqlBuilder it is returning the wrong…
1
vote
1 answer

Creating dynamic Query using SqlBuilder in java

can you help me for creating sql query in where condition SELECT * FROM classicmodels.offices t1 INNER JOIN classicmodels.employees t0 ON (t1.officeCode = t0.officeCode) INNER JOIN classicmodels.customers t2 ON ( (t0.employeeNumber =…
1
vote
0 answers

SqlBuilder() for C# compare datetime in Where condition

var builder = new SqlBuilder(); var sqlQuery = @"Select * From xxxxTable /**where**/"; var template = builder.AddTemplate(sqlQuery); builder.Where("xxx1= @xxx1", new { xxx1= xxx1}); builder.Where("convert(date,xxx2) < convert(date,GETDATE())"); //…
Nay
  • 256
  • 4
  • 16
1
vote
1 answer

Extract query parts from a SelectQuery (or equivalents)?

I have the following situation: Class A extends B. Other classes, such as C, D, etc. also extend B In Class B, I would like to situate logic with regard to general information common to A, C, and D. Hence, I would like to have a general query in B…
filpa
  • 3,651
  • 8
  • 52
  • 91
1
vote
1 answer

Laravel 5.2 select data unknown variable

My function in controller for get data when user search ajax. This is my code: $receiptNum = Request::get('receiptNum'); // echo $receiptNum = 123456 DB::connection()->enableQueryLog(); $q = DB::table('tbl_receipt AS r') ->join('company…
ching
  • 122
  • 7
1
vote
1 answer

Getting QueryDSL JAR files without Maven

Please excuse a newbie such as I for this silly question. I am trying to install QueryDSL in my Java project in Eclipse Mars to use it for SQL querying. I do not use Maven yet, and don't know how to use it, though it's definitely on my to learn…
Tamara Aviv
  • 885
  • 1
  • 11
  • 28
1
vote
1 answer

Build sql query object by lambda

Can anybody advise a lib to build a raw sql code by lambda expression? Do not advise EF and Linq2sql because it doesn't provide a control over query. Something like this. It's the code from my own library. But I don't wish to support this if there…
Serg046
  • 1,043
  • 1
  • 13
  • 42
1
vote
1 answer

How to set connectionstring for DbExtensions/SqlBuilder?

I am using DbExtensions/SqlBuilder.md for my project. And during connection I am getting following Error. A default provider name must be provided using the 'DbExtensions:DefaultProviderName' key in the appSettings configuration section. My…
Urvi
  • 220
  • 1
  • 3
  • 11
1
vote
2 answers

Returning all the data ignoring set year limit in SQL query

I have written the following query to return all the leaves that an employee has taken. What it should do is return values that lie in the current year and ignore the rest. What it is doing is that it returns all the values in the table including…
okay_google
  • 339
  • 4
  • 17
0
votes
1 answer

php, mysql search entry function

i want to build a search fnction for my php class which builds a sql search string for searching specific entries with a short line of code: $obj -> search(array('key'=>'value'),true_or_false); i wonder if there is any easier possibility to get the…
EnrageDev
  • 91
  • 6
0
votes
0 answers

Azure Data studio Build failed. Check output pane for more details. Process was killed with SIGTERM

I am new to Azure Data Studio using latest version 1.45.1 and trying to build a SQL database project. However, I encountered an error: "Build failed. Check output pane for more details. Process was killed with SIGTERM." .There are round 1000 to 2000…
0
votes
3 answers

WhereIn Inside ->where() array - Laravel Query Builder

I'm trying use a whereIn inside a where array I am passing to Laravel query Builder: $where = [['Participants.Client_Id','IN', $clientId]]; DB::table('Participants')->where($where)->get() Something like is what I want to achieve, and I know…
Devck - DC
  • 135
  • 1
  • 9
0
votes
1 answer

how to build sql from RelBuild without schema info?

i want to generate sql use calcite. like this org.apache.calcite.rel.rel2sql.RelToSqlConverterTest#testAntiJoin final FrameworkConfig frameworkConfig = Frameworks.newConfigBuilder() .parserConfig(SqlParser.Config.DEFAULT) // …
rancho
  • 3
  • 2