edmiRemoteListRepositories
EdmiError edmiRemoteListRepositories (SdaiServerContext serverContextId, SdaiString nameFilter, SdaiString ownerFilter, SdaiString groupOwnerFilter, SdaiOptions options, SdaiString **foundNames, SdaiInvocationId *edmiInvocationId);
Performs a query on the entity extent of the EDM_REPOSITORY entity in the ExpressDataManager model and lists all repositories that match an Express-X logical expression. The logical expression will be constructed from three user specified filters. These filters are;
- The Repository Filter
The repository filter gives direct access to the attributes of the EDM_REPOSITORY instances. The following is the declaration of the EDM_REPOSITORY entity:
ENTITY edm_repository;
name : SIMPLEID;
repository_id : UNIQUE_INDEX;
created : TIME_STAMP;
owner : edm_user;
group : edm_group;
administrators : SET OF USER_OR_GROUP;
protection : INTEGER;
access_rights_for : SET OF access_rights;
models : SET OF edm_model;
last_time_opened : PACKED_DATE;
last_opened_by : edm_user;
last_time_closed : PACKED_DATE;
sdai_repository : sdai_repository;
user_defined : BOOLEAN;
description : OPTIONAL STRING;
END_ENTITY;
The repository filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (<nameFilter>) AND . . ."
Examples:
"name LIKE 'Data*'"
lists all repositories with a name that starts with 'Data'. Â
"user_defined"
lists all user defined repositories.
Â
- The Owner Filter
The owner filter gives access to the attributes of the EDM_USER instance in the repositorys owner attribute. The following is the declaration of the EDM_USER entity:
ENTITY edm_user;
name : SIMPLEID;Â
user_id : UNIQUE_INDEX;Â
user_name : OPTIONAL STRING;Â
created : TIME_STAMP;Â
last_time_connected : PACKED_DATE;Â
default_model_repositories_protection : INTEGER;Â
default_dictionary_models_protection : INTEGER;Â
default_data_models_protection : INTEGER;Â
default_extra_schemata_protection : INTEGER;Â
default_archived_models_protection : INTEGER;Â
creating_repository_permission : OPTIONAL BOOLEAN;Â
owning_system_instances : OPTIONAL SET OF entity_instance;Â
password_defined : BOOLEAN;Â
password : STRING;Â
END_ENTITY;
Â
The owner filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (owner.<ownerFilter>) AND . . ."
Examples:
"user_id = 1"
lists all repositories owned by the superuser. Â
"name = 'Johnny'"
lists all repositories owned by Johnny.
- The Group Owner Filter
The group owner filter gives access to the attributes of the EDM_GROUP instance in the repositorys group attribute. The following is the declaration of the EDM_GROUP entity:
ENTITY edm_group;
name : SIMPLEID;
group_id : UNIQUE_INDEX;
created : TIME_STAMP;
users : SET OF edm_user;
description : OPTIONAL STRING;
default_model_repositories_protection : INTEGER;
default_dictionary_models_protection : INTEGER;
default_data_models_protection : INTEGER;
default_extra_schemata_protection : INTEGER;
default_archived_models_protection : INTEGER;
creating_repository_permission : OPTIONAL BOOLEAN;
owning_system_instances : OPTIONAL SET OF entity_instance;
END_ENTITY;
Â
The group owner filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (group.<groupOwnerFilter>) AND . . ."
Examples:
"group_id = 1"
lists all repositories owned by the 'sdai-group' group. Â
"name = 'Supervisor'"
lists all repositories owned by the 'Supervisor' group.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiString | nameFilter | A filter that may refer to any attribute of a repositorys EDM_REPOSITORY instances in the ExpressDataManager model. |
SdaiString | ownerFilter | A filter that may refer to any attribute of the EDM_USER instance in the owner attribute of a repositorys EDM_REPOSITORY instance in the ExpressDataManager model. |
SdaiString | groupOwnerFilter | A filter that may refer to any attribute of the EDM_GROUP instance in the group attribute of a repositorys EDM_REPOSITORY instance in the ExpressDataManager model. |
SdaiOptions | options | Currently not used. |
SdaiString | foundNames | A variable that will receive a pointer to a buffer of repository names that match the Express-X logical expression that was generated from the given filters. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Â
Example
Â
/* List all repositories owned by 'Johnny' */ int i; EdmiError rstat; SdaiServerContext suContext; SdaiString *repNames; /* Define Remote Server Context for the superuser */ rstat = edmiDefineServerContext("SuperUserContext", "superuser", NULL, "xfx56kl9", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &suContext); rstat = edmiRemoteListRepositories(suContext, NULL, "NAME = 'Johnny'", NULL, 0, &repNames, NULL); i = 0; while (repNames[i]) { printf("\nRepository %s", repNames[i]); edmiFree(repNames[i++]); } . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â
Â
Â
Â