www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Overview
Installation Guide
Quick Start & Tours
Sample ODBC & JDBC Applications
Conceptual Overview
Administration
Data Access Interfaces
SQL Reference
SQL Procedure Language Guide
General Principles
Scope of Declarations
Data Types
Handling Result Sets
Result Sets and Array Parameters
Exception Semantics
Virtuoso/PL Syntax
Execute Stored Procedures via SELECT statement
Execute Stored Procedures In Background
CREATE ASSEMBLY Syntax - External Libraries
CREATE PROCEDURE Syntax - External hosted procedures
Asynchronous Execution and Multithreading in Virtuoso/PL
Performance Tips
Procedures and Transactions
Distributed Transaction & Two Phase Commit
Triggers
Character Escaping
Virtuoso/PL Scrollable Cursors
Virtuoso PL Modules
Handling Conditions In Virtuoso/PL Procedures
Procedure Language Debugger
Row Level Security
Database Event Hooks
Data Replication, Synchronization and Transformation Services
Web Application Development
XML Support
RDF Data Access and Data Management
Web Services
Runtime Hosting
Internet Services
Free Text Search
TPC C Benchmark Kit
Using Virtuoso with Tuxedo
Appendix
Virtuoso Functions Guide

Abstract

Stored procedures are a key component of database performance. The fewer messages are sent between the client and the server for a given transaction, the faster it will complete.

Virtuoso/PL is a simple and straightforward language for writing stored procedures and triggers in Virtuoso. Its syntax is a combination of SQL and C, making learning it as easy as possible. It offers the features commonly found in database procedure languages in a simple, efficient and concise package. This document presents the primary concepts of the language and ends with a reference section.

Table of Contents

10.1. General Principles
10.2. Scope of Declarations
10.3. Data Types
10.4. Handling Result Sets
10.5. Result Sets and Array Parameters
10.6. Exception Semantics
10.7. Virtuoso/PL Syntax
10.7.1. Create Procedure Statement
10.7.2. Stored Procedures as Views & Derived Tables
10.7.3. Keyword and Optional Procedure Arguments
10.7.4. if, while, for, foreach statements
10.7.5. compound statement
10.7.6. goto, return statements
10.7.7. whenever statement
10.7.8. call, assignment statements
10.7.9. open, fetch, close, select ... into statements
10.7.10. FOR Select Statement
10.7.11. SET statement
10.7.12. SET Triggers
10.8. Execute Stored Procedures via SELECT statement
10.9. Execute Stored Procedures In Background
10.10. CREATE ASSEMBLY Syntax - External Libraries
10.11. CREATE PROCEDURE Syntax - External hosted procedures
10.12. Asynchronous Execution and Multithreading in Virtuoso/PL
10.12.1. Synchronization
10.13. Performance Tips
10.13.1. Remember the following:
10.14. Procedures and Transactions
10.15. Distributed Transaction & Two Phase Commit
10.15.1. Initiating Distributed Transactions
10.15.2. Responding to Distributed Transactions
10.15.3. 2PC Log & Recovery
10.15.4. Error Codes
10.16. Triggers
10.16.1. The CREATE TRIGGER statement
10.16.2. Triggers on Views
10.16.3. The DROP TRIGGER statement
10.16.4. Triggers and Virtual Database
10.17. Character Escaping
10.17.1. Statement Level
10.17.2. Connection Level
10.17.3. Server Default
10.18. Virtuoso/PL Scrollable Cursors
10.18.1. Declaring a Scrollable Cursor
10.18.2. Opening a Scrollable Cursor
10.18.3. Fetching Data From a Scrollable Cursor
10.18.4. Virtuoso/PL Scrollable Cursor Examples
10.18.5. FORWARD-ONLY (traditional cursor statement) Example
10.18.6. DYNAMIC (traditional cursor statement) Example
10.18.7. KEYSET (traditional cursor statement) Example
10.19. Virtuoso PL Modules
10.19.1. Syntax
10.19.2. Security
10.20. Handling Conditions In Virtuoso/PL Procedures
10.20.1. Declaring Condition Handlers
10.20.2. Stack Trace Reporting On Sql Error Generation
10.21. Procedure Language Debugger
10.21.1. Branch Coverage
10.21.2. Coverage Functions
10.22. Row Level Security
10.22.1. Row Level Security Functions