이 콘텐츠는 선택한 언어로 제공되지 않습니다.
9.3. DDL File Sequencer Example
Sequencing results in graph nodes basically representing the BNF structure of each DDL statement. Below is an example DDL schema definition statement containing table and view definition statements.
CREATE SCHEMA hollywood CREATE TABLE films (title varchar(255), release date, producerName varchar(255)) CREATE VIEW winners AS SELECT title, release FROM films WHERE producerName IS NOT NULL;
CREATE SCHEMA hollywood
CREATE TABLE films (title varchar(255), release date, producerName varchar(255))
CREATE VIEW winners AS SELECT title, release FROM films WHERE producerName IS NOT NULL;
The resulting graph structure contains the raw statement expression, pertinent table, column and key reference information and position of the statement in the text stream (e.g., line number, column number and character index) so the statement can be tied back to the original DDL:
Note that all nodes are of type
nt:unstructured
while the type of statement is identified using mixins. Also, each of the nodes representing a statement contain: a ddl:expression
property with the exact statement as it appeared in the original DDL stream; a ddl:startLineNumber
and ddl:startColumnNumber
property defining the position in the original DDL stream of the first character in the expression; and a ddl:startCharIndex
property that defines the integral index of the first character in the expression as found in the DDL stream. All of these properties make sure the statement can be traced back to its location in the original DDL.