|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.strangelight.db.Database
Encapsulates the strangelight.com database as a whole.
Method Summary | |
static java.sql.Connection |
get_connection()
obtains a java.sql.Connection object
for the strangelight.com database. |
protected static java.lang.String |
sql_escape(java.lang.String s)
a utility method for escaping strings for inclusion in SQL queries. |
protected static java.lang.String |
sql_quote(java.lang.Object object)
a utility method for embedding Java objects into SQL queries. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.sql.Connection get_connection()
java.sql.Connection
object
for the strangelight.com database. [Currently uses hard-coded
database settings, but could easily be modified to get its
settings from a configuration file.]
protected static java.lang.String sql_escape(java.lang.String s)
\
and '
characters
to \\
and \'
, respectively. Also
converts null
values to empty strings.
s
- the String to escape.
\
and '
characters converted to \\
and \'
,
respectively, or an empty string if s
was
null
.protected static java.lang.String sql_quote(java.lang.Object object)
object
- the Object to embed.
'
(single-quote) characters, or the String literal
"NULL"
if object
was null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |