Given a datastore reference and a kind, will return a function that will get a single entity by key

@param {Object} datastore A reference to the datastore Object
@param {String} kind The entity kind
@returns {Function} The get function
333990
function get(datastore, kind, namespace) {
    return function(id, cb) {
        var keyParam = [kind, id];
        if (namespace) {
            keyParam = {
                namespace: namespace,
                path: keyParam
            };
        }
        var key = datastore.key(keyParam);

        datastore.get(key, function(err, entity) {
            if (err)
                return cb(err);

            return cb(null, entity ? entity : null);
        });
    };
}
537521
function get(ref){
    if (ref && (isNode(ref) || ref.nodeType))
      return ref;
    else
      return typeof ref == 'string' ? document.getElementById(ref) : null;
  }
694573
private Map<String, Object> getEntity(String type, String id) throws StorageException {
        try {
            JestResult response = esClient.execute(new Get.Builder(getIndexName(), id).type(type).build());
            if (!response.isSucceeded()) {
                return null;
            }
            return response.getSourceAsObject(Map.class);
        } catch (Exception e) {
            throw new StorageException(e);
        }
    }
799265
function _getEntityKey(entityType, entity) {
  switch (entityType) {
    case 'remote-application':
    case 'application':
    case 'unit':
      return entity.name;
    case 'machine':
    case 'relation':
      return entity.id;
    case 'annotation':
      return entity.tag;
    default:
      // This is an unknown entity type so ignore it as we don't know how to
      // handle it.
      return null;
  }
}
853068
public QueryResults<Entity> newTypedQuery(String kind) {
    // [START newTypedQuery]
    String gqlQuery = "select * from " + kind;
    Query<Entity> query = Query.newGqlQueryBuilder(Query.ResultType.ENTITY, gqlQuery).build();
    QueryResults<Entity> results = datastore.run(query);
    // Use results
    // [END newTypedQuery]
    return results;
  }
615963
def get(self, key):
    '''
    '''

    ''''''
    value = self.child_datastore.get(key)
    return self.deserializedValue(value)
666864
function(entity){
            var game = this.game;
            return function(x, y){
                return game.entityCanSeeThrough(entity, x, y);
            };
        }
720662
def get_value_for_datastore(self, model_instance):
    
    value = super(JsonProperty, self).get_value_for_datastore(model_instance)
    if not value:
      return None
    json_value = value
    if not isinstance(value, dict):
      json_value = value.to_json()
    if not json_value:
      return None
    return datastore_types.Text(json.dumps(
        json_value, sort_keys=True, cls=JsonEncoder))
697287
public Object get(ULocale locale, int kind, ULocale[] actualReturn) {
        Key key = createKey(locale, kind);
        if (actualReturn == null) {
            return getKey(key);
        }

        String[] temp = new String[1];
        Object result = getKey(key, temp);
        if (result != null) {
            int n = temp[0].indexOf("/");
            if (n >= 0) {
                temp[0] = temp[0].substring(n+1);
            }
            actualReturn[0] = new ULocale(temp[0]);
        }
        return result;
    }
21731
def get_value_for_datastore(self, model_instance, cached=False):
        """"""
        value = getattr(model_instance, self._attr_name(), None)
        if not cached:
            value = getattr(model_instance, self.property_name).keys()
            setattr(model_instance, self._attr_name(), value)
        return value
1029984
function get(obj, key) {
  var type = getGlobalType(obj);
  var func = defaultTypeAdaptorStorage.requireAdaptor(type, 'get');
  return func(obj, key);
}
240479
function get(key, store = getDefaultStore()) {
  let req
  return store[IDBStore]('readonly', store => {
    req = store.get(key)
  }).then(() => req.result)
}
1306422
function onSuccess(result) {
            const datastoreEntity = result ? result[0] : null;

            if (!datastoreEntity) {
                if (_this.gstore.config.errorOnEntityNotFound) {
                    const error = new Error('Entity not found');
                    error.code = errorCodes.ERR_ENTITY_NOT_FOUND;
                    throw error;
                }

                return null;
            }

            _this.entityData = datastoreEntity;
            return _this;
        }
319165
function DataStore ( obj ) {
	this.autosave    = false;
	this.callback    = null;
	this.collections = [];
	this.credentials = null;
	this.datalists   = [];
	this.depth       = 0;
	this.events      = false;
	this.expires     = null;
	this.headers     = {Accept: "application/json"};
	this.ignore      = [];
	this.key         = null;
	this.keys        = {};
	this.leafs       = [];
	this.loaded      = false;
	this.maxDepth    = 0;
	this.mongodb     = "";
	this.parentNode  = obj;
	this.pointer     = null;
	this.records     = [];
	this.retrieve    = false;
	this.source      = null;
	this.total       = 0;
	this.views       = {};
	this.versions    = {};
	this.versioning  = true;
	this.uri         = null;
}
455823
function(instance) {
    var self = this;
    var result = Promise.bind();
    var fk = instance.getAttribute(this.foreignKeyAttr);
    if (fk) {
      result = result.then(function() {
        return self.objectsQuery(instance).execute();
      })
      .then(function(result) {
        self.validateFetchedObjects(instance, result);
        return result[0];
      });
    }
    else {
      result = result.then(function() {
        // pretend like we actually did the whole fetch & got back nothing
        self.associateFetchedObjects(instance, [null]);
      });
    }
    return result;
  }
1321921
function store(options) {
  options = options || {};
  var DataStore = lazy.DataStore();
  var opts = extend(options.store || {});
  return new DataStore('snippets', opts);
}
844607
public QueryResults<Key> newKeyQuery(String kind) {
    // [START newKeyQuery]
    Query<Key> query = Query.newKeyQueryBuilder().setKind(kind).build();
    QueryResults<Key> results = datastore.run(query);
    // Use results
    // [END newKeyQuery]
    return results;
  }