SQLite source code compilation and usage

Source: Internet
Author: User
Because the project needs to use the database, and it cannot depend on a specific platform but also has the flexibility, so I thought of SQLite, and then got the source code and started to modify and use it. Here we want

Because the project needs to use the database, and it cannot depend on a specific platform but also has the flexibility, so I thought of SQLite, and then got the source code and started to modify and use it. Here we want

Because the project needs to use the database, and it cannot depend on a specific platform but also requires flexibility, so I thought of SQLite and started to modify and use the source code. Here I will record it for the sake of memo, the following is a simple example, and I hope to help some people who are new to SQLite.

  • Briefly speaking, first define the added, deleted, modified, and queried strings, then format the strings as needed, and finally generate the execution command string, and then call the function that executes the SQL statement. here we need to pass several parameters, take the search as an example. There is a function called back after the result is found. If the result is found, the function is called back and passed in. Please note here, every time a record is found, the specified function is called back and the result is passed over. The parameters of the result callback function are briefly described here, the first parameter is a user-defined parameter specified for the result callback function when calling the SQL statement to execute the function. The second parameter is the number of fields in a record, corresponding to argv and aszColName, for example, argv [0] is the first field value of the current record (which can be understood as a row), aszColName [0] is the field name of the current record, and others are better understood, it's no longer awkward. It's time to forget it.

    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.