Supercharge Your Innovation With Domain-Expert AI Agents!

SQL statement parsing method based on FMDB

A parsing method and statement technology, applied in the field of FMDB-based SQL statement parsing, can solve problems such as errors and unfavorable development work, and achieve the effects of simplifying the amount of code written, improving development efficiency, and being easy to implement.

Active Publication Date: 2018-03-23
BEIJING KUWO TECH
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If a batch of attribute names are changed, the workload is simply disastrous, which can easily lead to errors and is not conducive to the development work

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SQL statement parsing method based on FMDB

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The present invention will be described in further detail below in conjunction with the accompanying drawings.

[0039] Such as figure 1 Shown, the SQL statement parsing method based on FMDB of the present invention, comprises the steps:

[0040] In the FM interface layer, create a UserDBManager class to manage the user database,

[0041] The UserDBManager class generates an object and calls the method: AllModel(), which internally calls the FMDB wrapper function:

[0042] Table function, used to specify table related information, said table refers to a table in the user database,

[0043] Operation function, used to specify information about the operation to be performed,

[0044] Additional functions for specifying additional conditional information,

[0045] After receiving and parsing the parameters corresponding to the above encapsulation functions, the UserDBManager class encapsulates the parsing results through the commit command, and then calls SQL to perform ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an SQL statement parsing method based on an FMDB. The method includes the following steps that on an FM interface layer, a UserDBManager class for managing a user database isestablished, wherein the UserDBManager class generates an object and calls the method of AllModel (), and the method internally calls FMDB encapsulating functions which include a table function for assigning the related information of a table which serves as a table in the user database, an operating function for assigning to-be-executed operation-related information, and an additional function for assigning additional conditional information; after parameters corresponding to the encapsulating functions are received and parsed, the UserDBManager class encapsulates a parsing result through a commit command, and then calls SQL to execute related operation. Based on the FMDB, the SQL statement parsing method is clear in structure and easy to achieve, the quantity of written code of SQL statements is simplified, the improvement of the development efficiency is made for, and errors caused by repetitive work in programming are reduced.

Description

technical field [0001] The invention relates to the technical field of SQLite API encapsulation, in particular to an FMDB-based SQL statement parsing method. Background technique [0002] The iOS SDK has supported SQLite for a long time. When using it, you only need to add the libsqlite3.dylib dependency and import the sqlite3.h header file. However, the native SQLite API is quite unfriendly in use, and it is very inconvenient to use. [0003] In addition, when using the SQLite database, it is inevitable to write a bunch of complex SQL statements. As follows (example only): [0004] / / Create table [0005] (1) CREATE TABLE IF NOT EXISTS BSUser (id integer (11) PRIMARY KEY, arr text DEFAULT NULL, data text DEFAULT NULL, stu_id long DEFAULT NULL, name text DEFAULT NULL, image text DEFAULT NULL); [0006] (2) CREATE TABLE IF NOT EXISTS BSTeacher (id integer (11) PRIMARY KEY, nametext DEFAULT NULL, depart text DEFAULT NULL); [0007] (3) CREATE TABLE IF NOT EXISTS BSStudent...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/24534G06F16/24539
Inventor 郭艳杰
Owner BEIJING KUWO TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More