File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,13 @@ ConnectionConfig.prototype.documentURL = function (params) {
663663 return this . branchBase ( 'document' ) + paramsStr ;
664664} ;
665665
666+ ConnectionConfig . prototype . prefixesURL = function ( ) {
667+ if ( this . db ( ) === this . system_db ) {
668+ return this . dbBase ( 'prefixes' ) ;
669+ }
670+ return this . branchBase ( 'prefixes' ) ;
671+ } ;
672+
666673ConnectionConfig . prototype . queryParameter = function ( params ) {
667674 if ( ! params || typeof params !== 'object' ) return '' ;
668675 const queryString = Object . keys ( params ) . map ( ( key ) => `${ key } =${ encodeURISegment ( params [ key ] ) } ` ) . join ( '&' ) ;
Original file line number Diff line number Diff line change @@ -1182,6 +1182,21 @@ WOQLClient.prototype.getBranches = function (dbId) {
11821182 // reset branch
11831183} ;
11841184
1185+ /**
1186+ * get the database collections list
1187+ * @param {string } [dbId] - the database id
1188+ * @returns {Promise } A promise that returns the call response object, or an Error if rejected.
1189+ * @example
1190+ * client.getBranches()
1191+ */
1192+ WOQLClient . prototype . getPrefixes = function ( dbId ) {
1193+ if ( dbId ) this . db ( dbId ) ;
1194+ return this . dispatch (
1195+ CONST . GET ,
1196+ this . connectionConfig . prefixesURL ( ) ,
1197+ ) ;
1198+ } ;
1199+
11851200/**
11861201 * Get the list of the user's organizations and the database related
11871202 * @returns {Promise } A promise that returns the call response object, or an Error if rejected.
You can’t perform that action at this time.
0 commit comments