swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

db.document-writer-sedna

 
 

Library: Database access (OMDB)
Import: omdb.xmd

Declaration

define string sink function db.document-writer-sedna
            of  value b.database database
          name  value string     document-name

or

  define string sink function db.document-writer-sedna
            of  value b.database database
          name  value string     document-name
    collection  value string     collection-name optional initial { "" }



Argument definitions

database
is a db.database object obtained by opening a connection to a database using one of the db.open functions.
document-name
is the name of the document to be stored in the database.
collection-name
is an optional string that is the name of the collection into which the document is to be stored within the database.


Purpose

Use db.document-writer-sedna to store an XML document into a Sedna database.

Usage Notes

Documents can also be stored in collections with a Sedna database.

The document name specified is the name it will have within the database.

This a string sink function and so the document to be stored is streamed into the function and through it into the Sedna database.

Example

The following program stores an XML document located in the file "auction1.xml".

    import "omdb.xmd" prefixed by db.
  
    process
       local db.database my-database
  
       set my-database to db.open-sedna "rhine" dbname "XMLDatabaseDemo" user
  "charley" password "chaplin"
  
       using output as db.document-writer-sedna of my-database name "auction1"
          output file "auction.xml"
       db.close my-database

        Other Library Functions
   db.advance-recordset
   db.close
   db.commit
   db.compile-statement
   db.database
   db.delete
   db.discard
   db.document-writer-sedna
   db.execute
   db.execute-in
   db.field
   db.insert
   db.is-null
   db.move-dynamic-record
   db.move-record
   db.omdb-version
   db.omdb-version-oci10g
   db.omdb-version-oci11g
   db.omdb-version-oci8i
   db.omdb-version-oci9i
   db.omdb-version-odbc
   db.omdb-version-sedna
   db.open-oci10g
   db.open-oci11g
   db.open-oci8i
   db.open-oci9i
   db.open-odbc
   db.open-procedure
   db.open-sedna
   db.open-table
   db.prepare
   db.procedure
   db.query
   db.reader
   db.record-exists
   db.rollback
   db.set-transaction-type
   db.statement
   db.streaming-execute
   db.table
   db.update
   db.writer
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.