Class TeiidDriver

  • All Implemented Interfaces:

    public class TeiidDriver
    extends Object
    implements Driver
    JDBC Driver class for Teiid Embedded and Teiid Server. This class automatically registers with the DriverManager The accepted URL format for the connection
    • Server/socket connection: jdbc:teiid:<vdb-name>@mm[s]://<server-name>:<port>;[user=<user-name>][password=<user-password>][other-properties]*
    • Embedded connection: jdbc:teiid:<vdb-name>@<>;[user=<user-name>][password=<user-password>][other-properties]*
    The user, password properties are needed if the user authentication is turned on. All the "other-properties" are simple name value pairs. Look at JDBCURL KNOWN_PROPERTIES for list of known properties allowed.
    • Constructor Detail

      • TeiidDriver

        public TeiidDriver()
    • Method Detail

      • getInstance

        public static TeiidDriver getInstance()
      • setLocalProfile

        public void setLocalProfile​(ConnectionProfile embeddedProfile)
      • setSocketProfile

        public void setSocketProfile​(ConnectionProfile socketProfile)
      • acceptsURL

        public boolean acceptsURL​(String url)
                           throws SQLException
        Returns true if the driver thinks that it can open a connection to the given URL. Expected URL format for server mode is jdbc:teiid::VDB@mm://server:port;version=1;user=username;password=password
        Specified by:
        acceptsURL in interface Driver
        url - used to establish a connection.
        A boolean value indicating whether the driver understands the subprotocol.
        SQLException - should never occur
      • getDriverName

        public String getDriverName()
      • parseURL

        protected static void parseURL​(String url,
                                       Properties info)
                                throws SQLException
        This method parses the URL and adds properties to the the properties object. These include required and any optional properties specified in the URL.
        url - The URL needed to be parsed.
        info - The properties object which is to be updated with properties in the URL.
        SQLException - if the URL is not in the expected format.
      • jdbcCompliant

        public boolean jdbcCompliant()
        This method returns true if the driver passes jdbc compliance tests.
        Specified by:
        jdbcCompliant in interface Driver
        true if the driver is jdbc complaint, else false.