docs: function _parse_predicate_key(Type, opts, key) {
  	opts = opts || {};
  
  	debug.assert(key).is('string');
  
  	if(key[0] !== '$') {
  		var datakey = get_predicate_datakey(Type);
  		//return new Predicate( "json_extract_path("+datakey+", '"+JSON.stringify([key])+"'::json->>0)::text", [], {'datakey': datakey, 'key': key});
  		return new Predicate( parse_keyref_json(datakey, key), [], {'datakey': datakey, 'key': key});
  	}
  
  	var _key = key.substr(1);
  
  	if( (opts.epoch === true) && ( (key === '$created') || (key === '$modified') ) ) {
  		//return new Predicate("to_json(extract(epoch from "+_key+")*1000)", [], {'key':_key});
  		return new Predicate("extract(epoch from "+_key+")*1000", [], {'key':_key});
  	}
  
  	if(key === '$documents') {
  		var traits = (opts && opts.traits) || {};
  		var documents = (traits && traits.documents) || [];
  		debug.assert(documents).is('array');
  		return new Predicate("get_documents(row_to_json("+(Type.meta.table)+".*), $::json)", [
  			JSON.stringify(parse_predicate_document_relations(Type, documents, traits))
  		], {'key':_key});
  	}
  
  	return new Predicate(_key, [], {'key':_key});
  }