Questions tagged [named-parameters]

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.

371 questions
0
votes
1 answer

pass PDO bindParam type in array

I am trying to pass the parameter constraint to PDO from an array i.e. public function write($sql,$bindparams=''){ try{ $stmt = $this->db_connection->prepare($sql); if($bindparams != '' && is_array($bindparams)){ …
sunwukung
  • 2,815
  • 3
  • 41
  • 56
0
votes
0 answers

cakephp How can I convert passed params to named params to prefill element form?

I'm using CakePHP version 2.2.3 I have an element with a search box and a few dropdowns that use CakeDC's search plugin. It works great and just passes the selected/searched items in the URL like this …
0
votes
1 answer

How can a Bash function detect whether it is being used with positional or named arguments?

I'm writing a Bash function that is to be capable of attempting to use either positional or named arguments, whereby positional arguments are accessed in the usual "${1}", "${2}" way and named arguments are accessed using getopts. I have some…
d3pd
  • 7,935
  • 24
  • 76
  • 127
0
votes
1 answer

How to use hibernate template to execute query using named parameters

I want to execute one query(update/delete) using hibernate template with named parameters. I am using spring 3 hibernatetemplate. Please tell me this asap.
0
votes
1 answer

NamedParameterJdbcTemplate with very large rowsets

Is there a way to return a "normal" resultset instead of a rowset from a NamedParameterJdbcTemplate? The rowset is using too much memory. I am creating an application to query a database, returning the results as an excel file. The results can be up…
Jonas
  • 95
  • 2
  • 2
  • 9
0
votes
2 answers

ANTLR named function arguments / parameters in any order

I'm been looking for a way to have named function arguments / parameters appear in any order in ANTLR. Does anyone know if there is syntax to ignore order in an ANTLR parser expression? Say there is a function foo in the language that can take two…
Han
  • 5,374
  • 5
  • 31
  • 31
0
votes
1 answer

When will I ever need more than what MySqli can give me?

I use mysqli for everything. I'm adding features to a small system I built, and some of the examples are pdo. I was about to convert to mysqli to match my system, but I realized it might be less work to change what I've already built to pdo. I've…
stevenmw
  • 689
  • 2
  • 8
  • 15
0
votes
1 answer

Using NamedParameterJdbcTemplate, how to retrieve record sets from sql server that match a list of regex patterns

I'm new to spring framework. I'm trying to retrieve record sets from a SQL server 2005 database table using NamedParameterJdbcTemplate that matches multiple patterns(patterns are stored in an ArrayList) . The below code retrieves record sets…
0
votes
1 answer

How to use something like "named parameters" with arrays?

If something is being passed into a method as object[] myparams, each element needs to be accessed as myparams[0], myparams[1], etc. Is there some way to provide more meaning to each index rather than just a number? Something perhaps similar to…
4thSpace
  • 43,672
  • 97
  • 296
  • 475
0
votes
1 answer

Use of named arguments in robot framework

I would like to pass a set of named variables to a keyword: Like this: | | Bypass | environment=${SystemUnderTest} | device=android | the keyword is defined in python like this: def Bypass(**kwargs): print "kwargs", kwargs This fails with…
Skip Huffman
  • 5,239
  • 11
  • 41
  • 51
0
votes
1 answer

Route the default URL trailed with a named arg

I'm wondering how to correctly route a default controller/action when the url is trailed by a named arg. I.E.: I want to route http://www.server.com/mode:full to http://www.server.com/users/index/mode:full I tried Router::connect ('/:mode',…
Sébastien
  • 1,667
  • 3
  • 20
  • 31
0
votes
1 answer

apply arguments to function

I would like to apply arguments represented as a hash to a function. For example, I would like to call this function: myFunc = function(a,b,c) { return b } In a way similiar to this: myFunc({a:1, b:2, c:3}) Is there a way to do this in javascript?
0
votes
2 answers

how to put a date in jdbc namedparameter

I have the following code: conditions.add("mydate = str_to_date('"+date_from_user+"', '%Y-%m-%d')"); the above works fine but since I am taking input from the user and shoving it in my query I'm risking the security of the query. So I wanted to use…
birdy
  • 9,286
  • 24
  • 107
  • 171
0
votes
2 answers

why my query or jpa query is not working in spring

When I run this query in my spring project it just return an error. I tried with different methods without any result, would be very greatful if anybody can help me. I have 3 tables: User, Role and User_Role and my Address is embedded. Use join…
user1067665
  • 495
  • 9
  • 32
0
votes
1 answer

PostgreSQL+NHibernate -> named parameter in LIKE section

In Spring+Hibernate app im trying to use a named parameter pasend query should sum values from xml document saved in database as text. SELECT document_type, SUM(CAST(substring(document_content ,'(.*[0-9])') as float)) as value,…
T.G
  • 1,913
  • 1
  • 16
  • 29
1 2 3
24
25