Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/y/pyon-HEAD/pyon/datastore/postgresql/base_store.py   pyon(Download)
        log.info('Creating datastore %s (create_indexes=%s, profile=%s)' % (qual_ds_name, create_indexes, profile))
        if profile == DataStore.DS_PROFILE.DIRECTORY:
            profile = DataStore.DS_PROFILE.RESOURCES
 
        profile = profile.lower()
        """
        qual_ds_name = self._get_datastore_name(datastore_name)
        if self.profile == DataStore.DS_PROFILE.RESOURCES:
            all_docs = self._find_all_docs("_all_docs", id_only=True, filter={})
            return [doc_id for doc_id, _, _ in all_docs]
    def _get_obj_type(self, doc, profile):
        """Returns the type of the given object based on datastore profile and inferrence from object"""
        obj_type = "O"
        if profile == DataStore.DS_PROFILE.RESOURCES:
            if doc.get("type_", None) == "Association":
        if id_only:
            query = "SELECT * FROM (SELECT id FROM "+dsn_res
            if self.profile == DataStore.DS_PROFILE.RESOURCES:
                query += " UNION ALL SELECT id FROM "+dsn_assoc
                query += " UNION ALL SELECT id FROM "+dsn_dir
            query += ") AS res"
        else:
            query = "SELECT * FROM (SELECT id, doc FROM "+dsn_res
            if self.profile == DataStore.DS_PROFILE.RESOURCES:

src/p/y/pyon-HEAD/pyon/datastore/datastore_query.py   pyon(Download)
    def __init__(self, profile=None, datastore=None, where=None, order_by=None, id_only=False, limit=0, skip=0, **kwargs):
        self.query = {}
        self.query["QUERYEXP"] = QUERY_EXP_ID
        qargs = self.query.setdefault("query_args", {})
        qargs["profile"] = profile or DataStore.DS_PROFILE.RESOURCES
    def _check_col(self, col):
        profile = self.query["query_args"]["profile"]
        if profile == DataStore.DS_PROFILE.RESOURCES:
            if not (col.startswith("ra") or col.startswith("att")):
                raise BadRequest("Query column unknown: %s" % col)

src/p/y/pyon-HEAD/pyon/ion/resregistry_standalone.py   pyon(Download)
        self.datastore_name = "resources"
        self.datastore = DatastoreFactory.get_datastore(datastore_name=self.datastore_name, config=config,
                                                        scope=sysname, profile=DataStore.DS_PROFILE.RESOURCES,
                                                        variant=DatastoreFactory.DS_BASE)