Revision 773
Added by bojilova over 23 years ago
src/edu/ucsb/nceas/dbadapter/DBAdapter.java | ||
---|---|---|
68 | 68 |
public abstract String getDateTimeFunction(); |
69 | 69 |
|
70 | 70 |
/** |
71 |
* The function name that is used to return non-NULL value |
|
72 |
* |
|
73 |
* @return return the non-NULL function name |
|
74 |
*/ |
|
75 |
public abstract String getIsNULLFunction(); |
|
76 |
|
|
77 |
/** |
|
71 | 78 |
* The character that the specific database implementation uses to |
72 | 79 |
* indicate string literals in SQL. This will usually be a single |
73 | 80 |
* qoute ('). |
src/edu/ucsb/nceas/dbadapter/DBPostgresql.java | ||
---|---|---|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/** |
82 |
* The PostgreSQL function name that is used to return non-NULL value |
|
83 |
* |
|
84 |
* @return return the non-NULL function name: "coalesce" |
|
85 |
*/ |
|
86 |
public String getIsNULLFunction() { |
|
87 |
|
|
88 |
return "coalesce"; |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
82 | 92 |
* PostgreSQL's string delimiter character: single quote (') |
83 | 93 |
* |
84 | 94 |
* @return return the string delimiter: single quote (') |
src/edu/ucsb/nceas/dbadapter/DBOracle.java | ||
---|---|---|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
/** |
79 |
* The Oracle's function name that is used to return non-NULL value |
|
80 |
* |
|
81 |
* @return return the non-NULL function name: "nvl" |
|
82 |
*/ |
|
83 |
public String getIsNULLFunction() { |
|
84 |
|
|
85 |
return "nvl"; |
|
86 |
} |
|
87 |
|
|
88 |
/** |
|
79 | 89 |
* The Oracles's string delimiter character: single quote (') |
80 | 90 |
* |
81 | 91 |
* @return return the string delimiter: single quote (') |
src/edu/ucsb/nceas/dbadapter/DBSqlServer.java | ||
---|---|---|
59 | 59 |
uniqueid = rs.getLong(1); |
60 | 60 |
} |
61 | 61 |
stmt.close(); |
62 |
System.out.println("Unique ID: " + uniqueid); |
|
62 |
//System.out.println("Unique ID: " + uniqueid);
|
|
63 | 63 |
return uniqueid; |
64 | 64 |
} |
65 | 65 |
|
... | ... | |
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
/** |
79 |
* The SQL Server's function name that is used to return non-NULL value |
|
80 |
* |
|
81 |
* @return return the non-NULL function name: "isnull" |
|
82 |
*/ |
|
83 |
public String getIsNULLFunction() { |
|
84 |
|
|
85 |
return "isnull"; |
|
86 |
} |
|
87 |
|
|
88 |
/** |
|
79 | 89 |
* The SQL Server's string delimiter character: single quote (') |
80 | 90 |
* |
81 | 91 |
* @return return the string delimiter: single quote (') |
Also available in: Unified diff
included new function that returns db specific non-null function name