Supercharge Your Innovation With Domain-Expert AI Agents!

A method of encapsulating sql statements based on fmdb

A technology for encapsulating methods and statements, applied in instruments, creating/generating source code, computing, etc., can solve problems such as unfriendly and inconvenient use of SQLiteAPI, and achieve the effect of improving development efficiency, clear structure, and simplifying the amount of code written

Active Publication Date: 2021-06-29
BEIJING KUWO TECH
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the native SQLite API is quite unfriendly in use, and it is very inconvenient to use

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
  • A method of encapsulating sql statements based on fmdb

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

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

[0035] Such as figure 1 As shown, the FMDB-based SQL statement encapsulation method of the present invention comprises the steps:

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

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

[0038] table function, used to specify the table in the user database, figure 1 In the illustrated embodiment, the user table is specified, that is, the user table,

[0039] selectArray function, used to specify the operation to be performed, figure 1 In the illustrated embodiment, the selectarray instruction is specified, that is, an array is selected, and a nil object is specified to be selected,

[0040] append function, for specifying optional append directives, figure 1 In the illustrated emb...

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 present invention relates to a method for encapsulating SQL statements based on FMDB, comprising the following steps: at the FM interface layer, creating a UserDBManager class for managing user databases, the UserDBManager class generates an object and calls the method: AllModel(), This method internally calls FMDB encapsulation functions: table function, used to specify the table in the user database, selectArray function, used to specify the operation to be executed, additional function, used to specify optional additional instructions, when the above parameters are received and parsed , the UserDBManager class encapsulates the analysis results through the commit command and transmits them to the SQL execution layer for processing. The invention is based on FMDB, has a clear structure, is easy to realize, simplifies the amount of coding of SQL statements, is beneficial to improve development efficiency, and reduces errors caused by repetitive labor in programming.

Description

technical field [0001] The invention relates to the technical field of SQLite API encapsulation, in particular to an FMDB-based SQL statement encapsulation 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. Contents of the invention [0003] For the defects existing in the prior art, the purpose of the present invention is to provide a method for encapsulating SQL statements based on FMDB. Based on FMDB, the structure is clear, easy to implement, and simplifies the amount of code written in SQL statements, which is conducive to improving development efficiency and reducing Errors caused by duplication of effort in programming. [0004] For achieving above object, the technical scheme that the present invention takes is: [0005] A metho...

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 Patents(China)
IPC IPC(8): G06F16/242G06F8/30
CPCG06F8/315G06F16/2433
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