Exists

Checks to see if the specified row exists in the table.

root@turing:/examples/dbo# java examples.dbo.Test -conf postgres.cnf -test examples.dbo.Exists -uid 42

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: postgres.cnf
>>> Exists: false
JVM shutdown: fc.io.Log - closing all logs...

root@turing:/examples/dbo# java examples.dbo.Test -conf postgres.cnf -test examples.dbo.Exists -uid 1

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: postgres.cnf
>>> Exists: true
JVM shutdown: fc.io.Log - closing all logs...

test=# select count(*) from mollytest where uid = 42;
 count 
-------
     0
(1 row)

test=# select count(*) from mollytest where uid = 1;
 count 
-------
     1
(1 row)
root@turing:/examples/dbo# java examples.dbo.Test -conf mysql.cnf -test examples.dbo.Exists -uid 42

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: mysql.cnf
>>> Exists: false
JVM shutdown: fc.io.Log - closing all logs...

root@turing:/examples/dbo# java examples.dbo.Test -conf mysql.cnf -test examples.dbo.Exists -uid 1

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: mysql.cnf
>>> Exists: true
JVM shutdown: fc.io.Log - closing all logs...

mysql> select count(*) from mollytest where uid = 42;
+----------+
| count(*) |
+----------+
|        0 | 
+----------+
1 row in set (0.01 sec)

mysql> select count(*) from mollytest where uid = 1; 
+----------+
| count(*) |
+----------+
|        1 | 
+----------+
1 row in set (0.10 sec)