Prepared statements and default values

Поиск
Список
Период
Сортировка
От Assad Jarrahian
Тема Prepared statements and default values
Дата
Msg-id 4bd3e1480601091924q54cfee5cs1c6744638e650fff@mail.gmail.com
обсуждение исходный текст
Ответы Re: Prepared statements and default values  (David Wall <d.wall@computer.org>)
Список pgsql-jdbc
I have a preparedStatement with the following query
 "UPDATE usersettings SET gpsfrequency = ? , serverurl = ? where
username = ? ;";

In the db, the table userSettings has a default value specified for
gps_frequency .

So when I write code
if (client.getSettings().getField(Settings.GPS_FREQUENCY).compareTo(""))==0)
    <what goes here> //pick up the default value from the db.
else
    setUserSettings.setInt(++i,
Integer.parseInt(client.getSettings().getField(Settings.GPS_FREQUENCY)));


<what goes here> .. I basically want to send something that lets the
db know to use the DEFAULT value. (its of type int0)

So what does go here?

any help would be much appreciated.

-a

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Fwd: [BUGS] BUG #2139: Problem when calling functions without any argument
Следующее
От: David Wall
Дата:
Сообщение: Re: Prepared statements and default values