Coder Social home page Coder Social logo

Uncaught Kotlin exception: com.ctrip.sqllin.driver.SQLiteResultCode: error rawExecSql: PRAGMA user_version = 1;, attempt to write a readonly database | error code SQLITE_READONLY about sqllin HOT 8 CLOSED

ctripcorp avatar ctripcorp commented on June 22, 2024
Uncaught Kotlin exception: com.ctrip.sqllin.driver.SQLiteResultCode: error rawExecSql: PRAGMA user_version = 1;, attempt to write a readonly database | error code SQLITE_READONLY

from sqllin.

Comments (8)

nbransby avatar nbransby commented on June 22, 2024

im guessing its here https://github.com/ctripcorp/SQLlin/blob/776e1f995259e36086d97bc4c578cf17ad9ca006/sqllin-driver/src/commonMain/kotlin/com/ctrip/sqllin/driver/Extension.kt#L99C1-L100C1

from sqllin.

nbransby avatar nbransby commented on June 22, 2024

And then thrown from here

from sqllin.

qiaoyuang avatar qiaoyuang commented on June 22, 2024

Okay, I will look at this issue today.

from sqllin.

qiaoyuang avatar qiaoyuang commented on June 22, 2024

I think this is a reasonable behavior. If users use read-only mode, they should ensure the value of DatabaseConfiguration.version same with the value in database file. So, I would add a separate check for this situation and throw an IllegalArgumentException with the related message.

from sqllin.

nbransby avatar nbransby commented on June 22, 2024

Does that number have to be greater than 0?

from sqllin.

qiaoyuang avatar qiaoyuang commented on June 22, 2024

Yes, if we create a new database, usually set the version is 1.

from sqllin.

nbransby avatar nbransby commented on June 22, 2024

OK great thanks

from sqllin.

qiaoyuang avatar qiaoyuang commented on June 22, 2024

You're welcome

from sqllin.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.