Python Django implements simple registration function

  For project creation strategy, please refer to the introduction of previous documents. The directory structure is as follows   Edit views.py from django.shortcuts import render # Create your views here. from django.http import HttpResponse from django.shortcuts import render from common.DBHandle import DataBaseHandle import ...

Posted by ixalmida on Wed, 23 Oct 2019 14:32:39 -0700

JPA tool class and CRUD operation instance

/** * Solve the waste of resources and time in entity manager factory * In the form of static code blocks, when a program first accesses this tool class, it creates a common entity manager factory object * * First access to getEntityManager method, create a factory object through static code blo ...

Posted by router on Wed, 23 Oct 2019 11:21:27 -0700

Apache Kudu cannot delete nonexistent data

Extend KafkaConnect Sink with Apache Kudu client. Java client of Apache Kudu used. Suddenly one day, I found that the job could not be submitted, and I kept reporting an error. Later, it was found that this is a verification mechanism of Kudu itself. In order to ignore this verification mechanism, and more in line with our SQL habits, I have ...

Posted by simmosn on Wed, 23 Oct 2019 07:02:25 -0700

8 common SQL error usages

Common SQL error usage 1. LIMIT statement Paging query is one of the most commonly used scenarios, but it is also the most prone to problems. For example, for the following simple statements, the general way DBA s think of is to add a composite index to the fields of type, name, create "time. In this way, conditional sorting can effe ...

Posted by DBHostS on Wed, 23 Oct 2019 05:42:36 -0700

The use of sql transaction and its skill arrangement

The use of sql transaction and its skill arrangement Summary: In the actual project development, in order to ensure the consistency of data operation results and other requirements, transaction is an essential solution tool. According to the implementation principle of SQL server, in fact, every execution statement of SQL server is a transac ...

Posted by macleo on Wed, 23 Oct 2019 04:43:14 -0700

Will index be used in MySQL query conditions?

When the user asks you if the index will be used for in in MySQL query criteria, how do you answer? Answer: index may be used Let's test it. 1. Create a table to index the field port CREATE TABLE `pre_request_logs_20180524` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ip` char(16) NOT NULL COMMENT 'agent IP', `port` int(8) NOT NULL COMMENT 'P ...

Posted by Havenot on Tue, 22 Oct 2019 13:21:33 -0700

Mybatis source code initialization of mybatis

The initialization of Mybatis is completed by SqlSessionFactoryBuilder. The main work is to parse the XML file, encapsulate the parsed class contents into the Configuration class, and finally encapsulate the Configuration class into SqlSessionFactory and return it. Since then, the initialization is completed. Three classes, XMLConfigBuilder, XM ...

Posted by zigojacko on Tue, 22 Oct 2019 06:03:10 -0700

Django writes data model classes

The design of database and table structure is the basis of website. In Django, you don't need to deal with the database directly through SQL statements, but you can create the data model completely with Python classes, and then give Django to complete the operation of creating the database. Data model class The data model class needs to be w ...

Posted by lJesterl on Sun, 20 Oct 2019 08:10:53 -0700

Location and automatic update of Ormlite custom db

Original link: http://www.cnblogs.com/riasky/p/3473504.html First, let's talk about the following test code. It's a bit messy. We should pay attention to it. The following examples are all the framework of the ORM Lite. First, customize ...

Posted by dannyone on Sat, 19 Oct 2019 07:26:39 -0700

A complete set of addition, deletion, modification and inspection of C-form student management system

C form student management system complete set of add, delete, modify and check main form: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms ...

Posted by koray on Fri, 18 Oct 2019 11:41:35 -0700