             row.id
 
     get: Promise.coroutine (id) ->
+        debug "get #{id}"
         [client, done] = yield @db.connect()
         try
             sql = @db.select()

            done()

    _upsert: Promise.coroutine (client, data) ->
        console.log data
        id = data.Code?.toLowerCase()
        updated = data.meta?.updated
        delete data.meta

        throw new Error "Missing geocache attribute 'Code'" if not id?

        try
            yield client.queryAsync 'BEGIN'


            done()

    deleteAll: Promise.coroutine ->
        debug "delete all"
        [client, done] = yield @db.connect()
        try
            sql = @db.delete()
