Haecceity implements John Duns Scotus. Actually, it is responsible for testing whether a thing exists, and is what we think it is.
| 236 | // Actually, it is responsible for testing whether a thing exists, and is |
| 237 | // what we think it is. |
| 238 | type Haecceity interface { |
| 239 | // Exists verifies that a thing exists and is of this type. |
| 240 | // This uses the PRIMARY_KEY to verify that a record exists. |
| 241 | Exists() (bool, error) |
| 242 | // ExistsWhere verifies that a thing exists and is of the expected type. |
| 243 | // It takes a WHERE clause, and it needs to gaurantee that at least one |
| 244 | // record matches. It need not assure that *only* one item exists. |
| 245 | ExistsWhere(interface{}, ...interface{}) (bool, error) |
| 246 | } |
| 247 | |
| 248 | // Implements the Recorder interface, and stores data in a DB. |
| 249 | type DbRecorder struct { |
no outgoing calls
no test coverage detected