Product Documentation
Virtuoso ADE SKILL Reference
Product Version IC23.1, November 2023

axlSDBSetChild

axlSDBSetChild(
x_SDBH
t_name
t_value
)
=> x_SDBH / nil

Description

Creates a new child element under the provided setup database handle.

Arguments

x_SDBH

Setup database handle under which a new child element is to be added

To avoid database corruption and undefined behavior, the provided handle's ancestor should be a previously added extension created with axlSDBPutExtension().

t_name

Name of the new element. Following are the naming conventions:

  • Must start with an upper-case letter
  • Can contain letters, digits, underscores, hyphens, and periods
  • Cannot contain whitespace
Names beginning with lower-case letters are reserved for future ADE expansion.

t_value

Value of the new element.

Value Returned

x_SDBH

The setup database handle of the child element is returned.

nil

The setup database handle of the child element is not returned.

Examples

Creates a new child element under the provided setup database handle.

;; given mainSDBH pointing to current setup
extensionSDBH = axlSDBPutExtension( mainSDBH "test extension")
kingSDBH = axlSDBSetChild( extensionSDBH "King" "Louis XIV")
Any name is either single or multi-entry. A single-entry element is differentiated by its name only, whereas a multi-entry element is differentiated by both name and value. All children of a particular element must be unique.

Single-entry:

extensionSDBH = axlSDBPutExtension( mainSDBH "test extension")
kingSDBH = axlSDBSetChild( extensionSDBH "King" "Louis XIV")

Since King is a single-entry name (the default), there can only be one child of extensionSDBH with King as its name. Attempting to specify another child element will update the value of the pre-existing element, and not create a new element. name can be made multi-entry by calling axlSDBSetMultipleEntry, after which calls to axlSDBSetChild with same name and different value will create new child elements.

For example:

axlSDBSetChild( extensionSDBH "King" "Henry VIII")
;; create an aggregating child under king. This isn't necessary but keeps the database tidy
;; we are not supplying a value because this is only demarcating a collection
ministersSDBH = axlSDBSetChild( kingSDBH "Ministers" "")
;; set the Minister tag as multi-entry.  No session or SDB handle is provided, and this affects *all* open ADE sessions and databases in the current
;; virtuoso invocation.
axlSDBSetMultipleEntry( "Minister")
;; OK, now we can add multiple ministers
axlSDBSetChild( ministersSDBH "Minister" "Alice")
axlSDBSetChild( ministersSDBH "Minister" "Bob")
axlSDBSetChild( ministersSDBH "Minister" "Eve")

Return to top
 ⠀
X