Unofficial Content
  • This documentation is valid for:

GXquery4 - GXquerySession data type

GXquery provides an API which allows developers to handle data types and methods to integrate queries made through GXquery within a GeneXus application.

Properties

SessionToken Security token for GXquery sessions.
SessionContext Context information for GXquery sessions.
Connection Connection information to GXquery.

 

Methods

IsValid   Verifies if the GXquery session is valid.
   Errors Out Error list, loaded by the method when error occurs.
GetMetadatas   Retrieves the list of metadata associated with the current session repository.
   Errors Out Error list, loaded by the method when error occurs.
SetMetadata   Sets the metadata to be used in the current session
   MetadataName  In Name of the Metadata.
   Errors Out Error list, loaded by the method when error occurs.
GetQueryByName   Gets a query given its name.
   QueryName  In Name of the Query.
   Errors Out Error list, loaded by the method when error occurs.
GetQueries   Gets the list of queries authorized for the current user.
   Option  In Sets the way in which queries are retrieved, and has four possible values:
  • AllQueries. Retrieves all queries, those owned by the current user and those shared with him by other users.
  • OnlySharedQueries. Retrieves those queries shared with the current user.
  • OnlyMyQueries. Retrieves only the current user's queries.
  • OnlyMyRecentQueries. Retrieves the last twenty queries used by the current user.
GetQueriesTree   Gets one level of the tree of queries authorized for the current user.
   ParentNodeType  In Parent node type; its possible values are:
  • Root. Indicates that it is the tree root and is invisible in the web interface.
  • GXquery4 - Folder icon Folder. Indicates the node is a folder.
  • GXquery4 - Query icon Query. Indicates that it is a query.
  • GXquery4 - Shared queries icon SharedQueries. Indicates the node containing the queries shared with the user.
  • GXquery4 - MyQueries icon MyQueries. Indicates the node containing the queries owned by the user.
  • GXquery4 - User icon User. Indicates a user sharing queries with the current user. These nodes are nested in the SharedQueries node.
   ParentNodeName   Parent node name.
   Errors Out Error list, loaded by the method when error occurs.
End   End the current session.
   Errors Out Error list, loaded by the method when error occurs.

 

Examples

In this example, the first sentence shows the StartSession method starting the session and loading the information in the GXquery Session data type.

In the second sentence, the &IsValid variable is loaded through the IsValid method.

In the third sentence, the GetMetadatas method retrieves the metadata list loading it into the &GXqueryMetadatas collection.

Event Start
    &GXquerySession = &GXquery.StartSession(&RepositoryName, &UserName, &UserPassword, &Errors)
    &IsValidSession = &GXquerySession.IsValid(&Errors)
    &GXqueryMetadatas = &GXquerySession.GetMetadatas(&Errors)
EndEvent

In this other example, the metadata name is set directly.

&GXquerySession.SetMetadata(&MetadataName, &Errors)

And so on.

 

 

 


 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant