QT Database Integration Application Package

Source: Internet
Author: User

Usually the big and small projects, basically need withDatabase dealing with a variety of application scenarios, I mainly encounter four kinds of scenes
1: Database auto-reconnection, such as MySQL database often encountered the server hangs, need to automatically detect and reconnect the database.
2: The database automatically cleans up early data and ensures that the database is up-to-date with limited capacity.
3: Data in real-time synchronization in the cloud, the client synchronizes data from the cloud to local.
4: Multithreaded bulk execution of SQL statements.
To do this, the various scenarios are deliberately packaged into classes, each of which only needs to pass in the corresponding parameters. Greatly saves theDevelopment time. Integrated into the PRI file, each time the project is introduced.

Dbtcpclientthread
/**
* Remote Data real-time synchronization thread client, responsible for uploading data
* 1: can set remote MySQL database information
* 2: Automatically re-connect the database
* 3: Can be set to detect the connection interval
* 4: Automatic reset of remote device information
* 5: All messages are signaled and can bePrint output in signal slot function
*/

Dbtcpserverthread
/**
* Remote Data real-time synchronization thread server, responsible forDownload data
* 1: can set remote MySQL database information
* 2: Automatically re-connect the database
* 3: Can be set to detect the connection interval
* 4: You can set the name of the table to query
* 5: All messages are sent to the signal slot function to print out
* 6: Return data results strictly in field order
* 7: The returned data contains both the keyword field data
* 8: Provides an interface to execute SQL statements against a remote database
* 9: Provides an interface to obtain the corresponding table data for the remote database
*/

Dbtcpdatathread
/**
* Local data synchronization to remote database thread
* 1: can set remote MySQL database information
* 2: can set local MySQL database information
* 3: Automatically re-connect the database, including the local database and the remote database
* 4: Can be set to detect the connection interval
* 5: All messages are sent to the signal slot function to print out
* 6: Supports priority execution of SQL statements
*/

Dbwebserverthread
/**
* Remote Data real-time synchronization thread server, responsible for downloading data
* 1: Web-based access to Web pages for return values
* 2: Can be expanded to support a variety of support methods
* 3: Can be set to detect the connection interval
* 4: You can set the name of the table to query
* 5: All messages are sent to the signal slot function to print out
* 6: Return data results strictly in field order
* 7: The returned data contains both the keyword field data
*/

Dbcountthread
/**
* Database Universal Paging class
* 1: Automatically according to the set number of pages per page of data paging
* 2: Simply pass in the table name/field collection/Number of rows per page/Flip indicator button/Text indicator label
* 3: Provides a public static method to bind field data to a drop-down box
* 4: Recommended condition field with a numeric type of primary key, extremely fast
* 5: Increase the total number of records that the thread query matches the condition, the data volume is large, the card masterinterface
*/

Dblocalthread
/**
* Local database open, close, check, re-connect
* 1: Support automatic database re-connection
* 2: Can set check database time interval
*/

Dbexecsqlthread
/**
* Bulk Execute SQL statement threading class
* 1: can set the corresponding database connection name and SQL statement
* 2: Execution results provide signal outgoing execution is successful, number of executions, time elapsed
*/

Dbdelegate
/**
* Custom Delegate Classes
* 1: Various delegate types can be set, such as text box/drop-down box/date box, etc.
* 2: Can set text box whether ciphertext display
* 3: Can set default data, including drop-down box data collection
* 4: Provides a value change signal, for example, drop-down box value change trigger
*/

Dbcleanthread
/**
* Automatic cleanup of data classes
* 1: can set the corresponding database connection name and table name to be cleaned
* 2: Conditional fields can be set
* 3: Can set sort field
* 4: Number of records that can be set for maximum retention
* 5: can set the interval to perform automatic cleanup
* 6: Late support for multiple databases and multiple tables
* 7: Recommended condition field with a numeric type of primary key, extremely fast
* 8: Add statistics with field name settings
*/

QT Database Integration Application Package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.