Reputation: 471
I am using JDBC Client CRUD Operations in my project with ballerina 1.0.0 alpha version. Below is the my code.
import ballerina/io;
import ballerinax/jdbc;
import ballerina/sql;
jdbc: Client testDB = new({
url: "jdbc:mysql://localhost:3307/incidentReportingSys",
username: "root",
password: "",
poolOptions: { maximumPoolSize: 5 },
dbOptions: { useSSL: false }
});
Then I get the errors cannot resolve module 'ballerinax/jdbc'
and cannot resolve module 'ballerina/sql'
.
How to solve this issue?
Upvotes: 1
Views: 584
Reputation: 1615
JDBC connector name is changed to java.jdbc
hence you can import it as
import ballerinax/java.jdbc;
You can find a sample here Ballerina JDBC example.
Upvotes: 2