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
2 answers
Parameter marker XXX was not present in the SQL String
I'm trying to use named parameter markers in a SQL query with Java and db2, like this:
SELECT ...
FROM mytable c ...
WHERE c.id_field = :myParam
I configure the connection like this:
Properties properties = new Properties(); // Create Properties…

madtyn
- 1,469
- 27
- 55
0
votes
1 answer
Named Parameter Markers in JDBC and DB2
I'm trying to use named parameter markers as in:
SELECT field
FROM table
WHERE field = :value -- I'd like to use this ':value'
I've been reading about this and I understood that I need to convert my PreparedStatement to a DB2PreparedStatement, and…

madtyn
- 1,469
- 27
- 55
0
votes
0 answers
C# Method/Function Parameter Passing Similar to Named Parameters, But Using '=' instead of ':'
So, I'm aware of the concept of Named Parameters and Optional Parameters within C#. This is the same idea, but it uses different syntax.
When passing, from the Newtonsoft.Json library, arguments to the JsonObject attribute, you're presented with a…

echoAwoo
- 1
0
votes
1 answer
Bigquery named parameters regex in Java
I am looking for a way to use a regex as value in a named parameter in the Java SDK. According to the documentation, there is no datatype for that, and using a String parameter does not work.
Is there any way to use a regex as value in a named…

fire
- 149
- 1
- 5
0
votes
2 answers
How do I pass labeled (or named) parameters to an existing AppleScript script file via the command line (using osascript)?
My Problem
I have an AppleScript script file called script.scpt.
This is the first line of the script where I'm intending to use labeled parameters (AKA named parameters):
on run given foo:fooStr
I open Terminal and attempt to run the script by…

Art Geigel
- 1,915
- 3
- 22
- 24
0
votes
1 answer
Why is it not possible to combine `...` and named arguments in Ruby 3?
In Ruby 3, the new ... syntax was introduced, allowing constructs like these:
def locked_run(...)
lock
run(...)
unlock
end
This is documented here: https://rubyreferences.github.io/rubychanges/3.0.html
After this discussion…

Kalsan
- 822
- 1
- 8
- 19
0
votes
1 answer
Providing example in named PowerShell parameter
With the code like this:
param
(
[Parameter(Mandatory = $true)]
[string]$TenantId,
[Parameter(Mandatory = $true)]
[System.Uri]$HostUrl,
[Parameter(Mandatory = $true)]
[string]$SiteId,
…

feedthemachine
- 592
- 2
- 11
- 29
0
votes
1 answer
how to implement named parameter like property in c++
I have a sorting function inside class Array and wanted to achieve something like in python sort(reverse=True). I want to show user that they can pass this parameter because right now arr.bubble_sort(true); (check the code) dose not make much…

DK_bhai
- 337
- 3
- 14
0
votes
1 answer
passing named parameters to index template while using httprouter golang package
I just learnt how to use the httprouter go package and read many documents about it but
failed to use the :name style of passing paramenters toe templates when it comes to the index
page template.
ex.
My router code:
func getRouter()…

Rodgers Ategyeka
- 59
- 8
0
votes
1 answer
Python: How to set function parameters by name with string
I'm making a framework for building GUI apps with tkinter and in my code I have a Scene class that has a
add(widget,params)
function which creates a tkinter widget and adds it to the Scenes widget dictionary.
But I can only add a widget that I have…

an inconspicuous semicolon
- 568
- 5
- 23
0
votes
1 answer
Named parameters with attribute constructors
Reading the documentation on using attributes: https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/attributes/, and it says that named parameters are allowed. I read that that as named parameters to the constructor, but…

jmoreno
- 12,752
- 4
- 60
- 91
0
votes
1 answer
Flutter named paramter is not defined for Card widget
I'm trying to create a reusable Card widget to use in other dart files throughout my app.
I keep getting a named parameter is not defined error. What could the problem be here?
Things I've already tried:
Reinstalling the flutter SDK.
Running…

jaimish11
- 536
- 4
- 15
0
votes
0 answers
How to setup a JDBC NamedParameter to be surrounded by double quotes?
Im using postgres@9.6 and I'm trying to do a query with a collate. The collate seems to require double quotes around the locale, for ex:
SELECT ... ORDER BY c.id COLLATE "en-US" ...
but of course I want the collation to be passed as an argument, so…

Brian
- 328
- 1
- 3
- 13
0
votes
1 answer
Best way to create a query in Hibernate with programmatical conditions
Let's say that I have a method responsible for building a query based on the parameters passed to it:
public Query buildQuery(String name, String city) {
Session session = HibernateUtil.getSessionFactory().openSession();
…

Couper
- 414
- 5
- 13
0
votes
1 answer
Passing constructor value to same implementation parameters according the context with autofac
I have some mvc controllers must instanciate a single logger according the fully qualified controller name.
I try to explain with examples. I have this logger interface:
public interface Ilogger { ... }
and its implementation
public class MyLogger…

Simone
- 2,304
- 6
- 30
- 79