URL Templates: datasource driver template error
Answered
I'm trying to create a datasource (under the database tab), and I get an error: Invalid type name. Specifically, I'm creating a new "Driver and Data Source" for using the informix jdbc driver. In the URL template, I have "jdbc:informix-sqli://{host}:{port}/{database}:informixserver={instance};" (based on their documentation). IntelliJ doesn't appear to like the "instance" variable. Am I doing something wrong?
Please sign in to leave a comment.
Indeed, to correctly parse the database host/port IDE needs to know how to interpret the jdbc url you provide. When doing it IDE uses the configured URL templates.
Try specifying `{instance:identifier}` instead of `{instance}`.
The format for the template variable is like the following:
where
- <template type> - determine how this template variable should be interpreted by the IDE, i.e. host/port/database etc. This name will also be displayed in connection settings form (General tab);
- <value type> - the type value. Determine how IDE will parse this value (as number, as string etc). These are internal types which are defined in IDE (examples are "identifier", "database", "port" - you can check the examples in other existing drivers)
- <default value> the value use by default (if any)
If <value type> is omitted it will be taken from <template type>. I.e.:
the <template type> and <value type> will be given value 'port'.