Oracle Magazine, July/August 2019
Database Developer PL SQL The usual approach to take advantage of these operations is to call the FIND method of SODA_ COLLECTION_ T FIND returns an instance of the operation type of the collection You then use methods of SODA_ OPERATION_ T to perform the desired actions The following are SODA_ OPERATION_ T methods that perform read operations get_ cursor returns a pointer to a cursor that enables you to fetch all specified documents through the API not SQL get_ one gets a single document count returns the count of documents that match your criteria And the following are SODA_ OPERATION_ T methods that perform write operations replace_ one replaces the contents of a document replace_ one_ and_ get replaces the contents and returns the key to the new document remove removes the specified document These methods are terminal methods They are the last method you invoke in a chain of invocations to perform the read or write operation Every method call before that in the chain is a nonterminal method which helps you get to precisely the document s you want to read or write You can think of the nonterminal methods as all contributing in their way to a WHERE clause applied to the search through the collection These are the nonterminal methods key specifies the key for the document you want to operate on keys provides a comma delimited list of keys Filter uses JSON query by example syntax to specify documents of interest an ordering of the documents returned and more version specifies the document version for your find operation ORACLE MAGAZINE JULY AUGUST 2019 90
You must have JavaScript enabled to view digital editions.