Named parameters enable you to specify an argument for a particular parameter by associating the argument with the parameter's name rather than with the parameter's position in the parameter list.
Questions tagged [named-parameters]
371 questions
0
votes
1 answer
How to get a string from a dictionary and use it as a named parameter in any function?
I have a dictionary in python,
mapper = {'my_func': ['a', 'b', 'c', 'd']}
I want to call a function which takes a, b, c, d and e parameters -
functn(a, b, c, d, e=None)
The parameters a, b, c, d is what I want to use while calling the function,…

Aakash Basu
- 1,689
- 7
- 28
- 57
0
votes
2 answers
Named Parameters in C# 4 and Intellisense
Am I right in saying there is no Intellisense for C# 4 named parameters in Visual Studio 2010.
For example if I have the following method signature:
public static List GetPerson(string personId = null, string postCode = null, string lastName…

FloatLeft
- 1,317
- 3
- 23
- 40
0
votes
3 answers
Disable all queries in SQL Server that don't use named parameters?
It seems that one could stop all threat of Sql injection once and for all by simply rejecting all queries that don't use named parameters. Any way to configure Sql server to do that? Or else any way to enforce that at the application level by…

nganju
- 720
- 6
- 16
0
votes
1 answer
Teradata - Running query passed as parameter
I am trying to learn Teradata and trying to simplify the way we copy data from production DB to testing DB for testing.
For this process we need to fill up an excel with below details and send to our TDBA:-
Prod Table DbName
Prod Table Name
Prod…

pradipti
- 85
- 8
0
votes
2 answers
Razor C# code to VB
I trying to convert this C# code VB.Net. its giving syntax error.
C#
@{
var grid = new WebGrid(source: data,
defaultSort: "name",
rowsPerPage: 30)
}
VB.Net
@Code
Dim grid as new…

sfgroups
- 18,151
- 28
- 132
- 204
0
votes
4 answers
Nested named parameters in PHP
Named parameters are great for a long list of options in a PHP user defined function or class. But what about nested options?
Eg:
function foobar($foo,$bar,$options=array()) {
$default_options =…

DADU
- 6,482
- 7
- 42
- 64
0
votes
1 answer
How to prevent Hibernate from assuming data types for parameter binding based on names
I just noticed that Hibernate automatically assumes data types for query parameters based on names (maybe column or annotated class). I'm trying to store a unix timestamp as long in a BIGINT column in a MySQL database. When the name is timestamp in…

henrik
- 708
- 7
- 14
0
votes
1 answer
problem with named parameter query in hibernate
In order to prevent SQL Injection i am trying to convert dynamic queries to named parameter query.. however, when i am using this code -
String query = "from Ad a left join fetch a.adQueries left join fetch a.aduser u left join fetch u.profile…

Juzer Arsiwala
- 601
- 2
- 10
- 20
0
votes
2 answers
Groovy SQL named list parameter
I want to use a keyset of a Map as a list parameter in a SQL query:
query = "select contentid from content where spaceid = :spaceid and title in (:title)"
sql.eachRow(query, [spaceid: 1234, title: map.keySet().join(',')]) {
rs ->
println…

CaptainMango
- 17
- 2
- 6
0
votes
0 answers
Doctrine Silex query with bound params fails
[EDIT] Removed parametrized table name and altered values of order and minimum rating count to distinguish values [/EDIT]
I have a simple table with following create table
CREATE TABLE ratings_cache (
id INT NOT NULL AUTO_INCREMENT,
movie_id…

Tomasz Kapłoński
- 1,320
- 4
- 24
- 49
0
votes
1 answer
java.lang.IllegalArgumentException: Unknown parameter name : Diagnosticcentreid
I m trying to call API with input parameter Diagnosticcentreid And getting error as
java.lang.IllegalArgumentException: Unknown parameter name : Diagnosticcentreid
Where is my mistake can anyone help me?
public List…

mehul
- 109
- 3
- 12
0
votes
1 answer
NamedParameterJdbcTemplate set params with OR operator and check for null
class Request{
private string f1;
private string f2;
private string f3;
}
I have the following query
SELECT * FROM tbl WHERE f1 = 'val' OR f2 = 'val2' OR f3 = 'va3'
fields from Request can be null. I need to create…

user5620472
- 2,722
- 8
- 44
- 97
0
votes
1 answer
How to autowire NamedParameterJdbcTemplate in Spring Boot
I understand that Spring Boot automatically configure JDBCTemplate for us. But i don't know exactly which way is correct when i want to autowire NamedParameterJdbcTemplate.
private NamedParameterJdbcTemplate template
or
private…

Thịnh Kều
- 163
- 1
- 1
- 17
0
votes
0 answers
Get nullPoint when using NamedParameterJdbcTemplate
Depending on project's requirement, we want to change from JdbcTemplate into NamedParameterJdbcTemplate in database handling. But I got null point error when I test my coding. I'm sure the error has occurred because of my configuration, but I could…

Thịnh Kều
- 163
- 1
- 1
- 17
0
votes
1 answer
Default parameter value in this __init__() method's definition?
I am looking at some python code to control a camera and having some trouble understanding it due to being new at python. I see that the src parameter is set to 0. Does this mean that if a src is not given 0 will be used otherwise the given src…

Lightsout
- 3,454
- 2
- 36
- 65