knowm / yank Goto Github PK
View Code? Open in Web Editor NEWUltra-Light JDBC Persistance Layer
Home Page: http://knowm.org/open-source/yank/
License: Apache License 2.0
Ultra-Light JDBC Persistance Layer
Home Page: http://knowm.org/open-source/yank/
License: Apache License 2.0
otherwise an Instantiaion Exception occurs, without a decent message, and people don't know what the problem is.
Hy @timmolter,
diff --git a/src/main/java/com/xeiam/yank/YankPoolManager.java b/src/main/java/com/xeiam/yank/YankPoolManager.java
index da3d4e5..f374d7d 100644
--- a/src/main/java/com/xeiam/yank/YankPoolManager.java
+++ b/src/main/java/com/xeiam/yank/YankPoolManager.java
@@ -90,7 +90,7 @@
if (this.hikariDataSource != null) {
logger.info("Releasing pool: {}...", this.hikariDataSource.getPoolName());
- this.hikariDataSource.shutdown();
+ this.hikariDataSource.close();
}
}
then pom.xml dependency can be changed too:
from:
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java6</artifactId>
<version>2.3.9</version>
<scope>compile</scope>
</dependency>
to:
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.4.1</version>
<scope>compile</scope>
</dependency>
A small issue I've found in examples MYSQL_SQL.properties too:
BOOKS_CREATE_TABLE=CREATE TABLE `Books` ...
should be changed to:
BOOKS_CREATE_TABLE=CREATE TABLE `BOOKS` ...
I tested with Mysql, and got an error: 'BOOKS' could not be found.
Thank you very much.
Helmut
Could you help me to send null params for dates ?
ScalarHandler is generic, built-in, already in use, and more robust - not limited to one type. Common case to have INT generated primary keys, so the custom class is brittle.
with yank can i set variables like:
set @varDate = '2020-02-13'
maybe as written about here: http://northconcepts.com/blog/2013/01/18/6-tips-to-improve-your-exception-handling/
Hello.
There are two changes you might consider:
DBConnectionPool.release()
should set checkedOut=0;
DBConnectionPool.getConnection()
...
if (con.isClosed()) {
checkedOut--;
//etc
}
//etc
When I use the queryColumn, it give me the desired result whereas using queryColumnSQLKey and passing the SQL key does not work well. It returns empty value for each record and not the actual value.
This is more documenting the issue than asking for help, but I discovered that both insert
and insertBatch
call PreparedStatement.getGeneratedKeys()
, which is not supported by any SQLite JDBC driver. This prevents getting the new ID from the inserted row.
However, it turns out that https://github.com/xerial/sqlite-jdbc supports getGeneratedKeys()
, but only on an older release (2 weeks ago from posting), 3.42.0.1.
Look at the API Javadocs to see where Javadocs are missing
i need suppress the server logging messages, i want only the error messages,
can i do this task with normal options or i need update the code.
can you help me please.
Hi,
I have used Yank manager for my database connection but beyond a point of time, I am getting "Too many connections". Do I need to handle separately for connection pooling.
createPool(String poolName, HikariDataSource hikariDataSource)
I have table structure:
CREATE TABLE users
(
user_id
int(11) NOT NULL AUTO_INCREMENT,
admin_id
int(11) DEFAULT NULL,
loginname
varchar(100) NOT NULL,
password
varchar(45) NOT NULL,
password_salt
varchar(10) NOT NULL,
display_name
varchar(100) DEFAULT NULL,
first_name
varchar(100) DEFAULT NULL,
last_name
varchar(100) DEFAULT NULL,
email
varchar(100) NOT NULL,
phone
varchar(20) DEFAULT NULL,
created_time
int(10) NOT NULL,
active
tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (user_id
),
UNIQUE KEY email_UNIQUE
(email
),
UNIQUE KEY loginname_UNIQUE
(loginname
),
KEY fk_users_users_idx
(admin_id
),
CONSTRAINT fk_users_users
FOREIGN KEY (admin_id
) REFERENCES users
(user_id
) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
Can not get values of fields have underscore:
Users{userId=0, adminId=0, loginname='[email protected]', password='1c1802e725674705f25af1de5a50dec9', passwordSalt='null', displayName='null', firstName='null', lastName='null', email='[email protected]', phone='0989831911', createdTime=0, active=1}
Dbutils 1.7 isn't thread safe. https://issues.apache.org/jira/browse/DBUTILS-135. A fix is available in DbUtils 1.8 (due to be released shortly).
apologies if I am repetitive,
I have a concurrent, multiuser web application that each user connects to this application uses a custom database.
eg User 1 connects to the database 1 and so on (I have almost 100 users and the same number of databases).
several or all users are connected simultaneously.
yank 3 can optimally cover this scenario?
otherwise you could please recommend some strategy or other product (excuse me if the latter is reckless)
i have a properties file with various databases differentiated by pool name,
how can i manage this in the new version?
Actually this looks pretty easy with annotations. DBUtils allows for an override map so something like the following would work with an annotation parser beforehand:
final Map<String, String> columnToPropertyOverrides = new HashMap<>();
columnToPropertyOverrides.put("WIND_DIRECTION", "WindDirection");
BeanProcessor dateForProcessor = new BeanProcessor(columnToPropertyOverrides);
BasicRowProcessor rp = new BasicRowProcessor(dateForProcessor);
Am I missing something?
Thanks
Idea: take a look at how Tomcat accepts any datasource and shuts it down properly.
just throw exceptions instead in the case where something is missing.
Apache Commons DbUtils is at 1.7
HikariCP is at 2.6.3
Both of them with fixes and improvements.
:-)
I am starting a new project, could you please inform me if mariadb 10.0 is and will be fully supported in this version and in the next version of yank?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.