Hibernate, Session object, Query object and HQL
Session object
1. Introduction
Session object is the object of database session, which provides the method of interaction with database
session object is thread unsafe, so it cannot be used as a global variable
2. Obtaining and closing the session object
How to get / create and close:
//Get new session object (not commonly us ...
Posted by voyde on Mon, 04 May 2020 21:59:42 -0700
Talk about maxwell's MysqlPositionStore
order
This paper mainly studies MysqlPositionStore of maxwell
MysqlPositionStore
maxwell-1.25.1/src/main/java/com/zendesk/maxwell/schema/MysqlPositionStore.java
public class MysqlPositionStore {
static final Logger LOGGER = LoggerFactory.getLogger(MysqlPositionStore.class);
private static final Long DEFAULT_GTID_SERVER_ID = new Long(0);
priv ...
Posted by pcjeffmac on Mon, 04 May 2020 19:38:25 -0700
Database learning II: mysql installation and startup
2, mysql installation and startup
1. How to install mysql
1.RPM, Yum: easy to install, fast to install, unable to customize
2. Binary: it does not need to be installed, can be used after decompression, and cannot be customized
3. Compile and install: customizable, slow to install.
Before 5.5:. / configure make make install
After 5.5: cmakegm ...
Posted by cheechm on Mon, 04 May 2020 17:42:10 -0700
[mybatis xml] data layer framework application -- one of Mybatis relationship mapping to one
In the actual development, the operation of database often involves multiple tables, which involves the relationship between objects in object-oriented.
For multi table operations, MyBatis provides association mapping. Through association mapping, the association relationship between objects can be well handled.
Catalog
What y ...
Posted by coollog on Mon, 04 May 2020 14:23:40 -0700
Principle and Practice of Golang Context
Let's learn how to use the golang Context and how to implement it in the Standard Library.
The golang context package started as a Golang package used internally by Google and was officially introduced into the Standard Library in Golang version 1.7.Start learning below.
Brief introduction
Before learning about context packages, look at several ...
Posted by varsha on Mon, 04 May 2020 11:07:21 -0700
SQL Server Database Foundation (the most commonly used database and table building, 54 classic cases and syntax formats)
Building database and table:
if DB_id('TicketManager ')is not null --Judge whether the database already exists
drop database TicketManager --Remove the existing database
go
create database TicketManager --New database
on
(
name='TicketManager ',--Database name
filename='E:\CS Review cases of Architecture\TicketManager\DB\TicketManager. ...
Posted by waltonia on Mon, 04 May 2020 04:11:09 -0700
SQLite realizes user login function
SQLite realizes user login function
void login::on_LoginToMain_clicked()
{
//The login button needs to determine whether the user name and password correspond correctly
//If there is an error, a prompt dialog box will pop up
//--------------------------------------
//Use SQlite to compare user name and password
QSqlDa ...
Posted by ninevolt1 on Sun, 03 May 2020 21:36:07 -0700
Analysis of common parameters of execution plan
1,ANALYZE
Actually execute the actual SQL, and see the time of each step of the execution plan
2,VERBOSE
Additional information for explicit planning, additional information: columns output by each node in the planning tree. The trigger being fired also displays the name of the initiator. The default is FALSE.
3,COS ...
Posted by chard on Sun, 03 May 2020 14:52:16 -0700
Using mybatis to dynamically load external sql
background
I don't know if there is such a puzzle in your company. Many departments often ask your department to provide interfaces to query some data. The interface basically has no business logic. An SQL is enough, but it takes time and effort to develop an interface for this SQL. Many people also want to solve it. For example, they often wri ...
Posted by snake310 on Sun, 03 May 2020 14:14:16 -0700
The difference between sql join on and where
The difference between sql join on and where
explain select count(1) from cellinfo_20171124 ci join shandong_lac_ci slc on concat(cast(ci.lac as string),",",cast(ci.ci as string)) =slc.lac_ci;
| == Physical Plan ==
*HashAggregate(keys=[], functions=[count(1)])
+- Exchange SinglePartition
+- *HashAggregate(keys=[ ...
Posted by lmaster on Sun, 03 May 2020 04:01:25 -0700