xdmp:database returns the current database id. xdmp:database-name returns the name given an id.
xdmp:database-name(xdmp:database()) --> will give you the name of your database. https://docs.marklogic.com/xdmp:database https://docs.marklogic.com/xdmp:database-name [cid:[email protected]]<http://www.flatironssolutions.com/> Brad Rix Technical Lead Office: 303.542.2172 | Skype: brad.rix | Google IM: [email protected] Mobile: 303.915.2771 [email protected] | http://www.flatironssolutions.com/ Tw: @FlatironsSols<https://twitter.com/FlatironsSols> | Fb: https://www.facebook.com/FlatironsSolutions This e-mail and all information included herein do not constitute a legal agreement accorded by FLATIRONS SOLUTIONS and its affiliates and subsidiaries. All legal agreements must be formulated in writing by a legal representative of FLATIRONS SOLUTIONS. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail by mistake, please inform us and destroy this e-mail and any documents it might contain. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this e-mail. Thank you for your cooperation. From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, September 05, 2013 10:05 AM To: [email protected] Subject: [MarkLogic Dev General] retrieve database id without passing applicationName All, Is there any method/logic which returns database id/name without passing application id/name. Basically, It has to figure from the appserver where the xqy is being is hit. Use case - My xqy files are in a modules database and a application server points to this modules database and actual data database. So, my xqy files should figure out the actual database without passing the application name. Thanks Praveen
<<inline: image001.png>>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
