JDBC Driver for HarperDB

Build 22.0.8462

Custom Schema Example

This section contains an example of a complete schema that has been automatically generated using the driver's CreateDriverSchema stored procedure. The schema consists of the following parts:

  • The info section enables a relational view of a HarperDB table. For more details, see Custom Schema Definitions.

  • The GET, POST, MERGE, and DELETE methods allow SELECT, INSERT, UPDATE, and DELETE commands to this table. The coreExecOperation operation is an internal implementation and can be copied as-is to your own custom schema file.

<rsb:script xmlns:rsb="http://www.rssbus.com/ns/rsbscript/2">  

  <rsb:info title="StaticRestaurants" description="Generated Schema File">  
    <!-- Column definitions -->
    <attr  name="borough"           xs:type="string"           />
    <attr  name="cuisine"           xs:type="string"           />
    <attr  name="address_building"  xs:type="string"  other:xpath="address/building" />
    <attr  name="address_street"    xs:type="string"  other:xpath="address/street"   />
    <attr  name="address_coord_0"   xs:type="double"  other:xpath="address/coord[0]"  />
    <attr  name="address_coord_1"   xs:type="double"  other:xpath="address/coord[1]"  />
  </rsb:info>  

  <rsb:script method="GET">
    <rsb:call op="coreExecOperation" out="toout">
      <rsb:push item="toout"/>
    </rsb:call>
  </rsb:script>

  <rsb:script method="POST">
    <rsb:call op="coreExecOperation" out="toout">
      <rsb:push item="toout"/>
    </rsb:call>
  </rsb:script>

  <rsb:script method="DELETE">
    <rsb:call op="coreExecOperation" out="toout">
      <rsb:push item="toout"/>
    </rsb:call>
  </rsb:script>

  <rsb:script method="MERGE">
    <rsb:call op="coreExecOperation" out="toout">
      <rsb:push item="toout"/>
    </rsb:call>
  </rsb:script>

</rsb:script>

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462