Code Monkey home page Code Monkey logo

Comments (11)

siscia avatar siscia commented on September 21, 2024

Hi there,

it seems very very weird.

Can you post the database?

Can it be that you have the data swapped in the database?

Cheers,
Simone

from redisql.

siscia avatar siscia commented on September 21, 2024

You can create a new database backed by a file:

REDISQL.CREATE_DB new test.sqlite

And then copy your db to the new one.

REDISQL.COPY DB new

And now in test.sqlite there should be your original database.

Another alternative is running:

REDISQL.EXEC DB "SELECT C_TS FROM C_KAKOU;`

And print the result.

from redisql.

dong524dong avatar dong524dong commented on September 21, 2024

I'm very sorry, I don't understand what you mean too much. Could you please guide me in the specific operation?

from redisql.

siscia avatar siscia commented on September 21, 2024

Can you run this command:

REDISQL.EXEC DB "SELECT C_TS FROM C_KAKOU;"

What is the result?

from redisql.

dong524dong avatar dong524dong commented on September 21, 2024

According to the steps you know, the result of the execution is still the same, and the order of the columns is out of order.

    1. "AB3981"
    2. (integer) 1
    3. "2019-01-01 00:01:01.0"
    4. "jingzhou"
    1. "AB3982"
    2. (integer) 2
    3. "2019-01-01 00:01:02.0"
    4. "jingzhou"
    1. "AB3983"
    2. (integer) 3
    3. "2019-01-01 00:01:03.0"
    4. "jingzhou"
    1. "AB3984"
    2. (integer) 4
    3. "2019-01-01 00:01:04.0"
    4. "jingzhou"
    1. "AB3985"
    2. (integer) 5
    3. "2019-01-01 00:01:05.0"
    4. "jingzhou"
    1. "AB3986"
    2. (integer) 6
    3. "2019-01-01 00:01:06.0"
    4. "jingzhou"
    1. "AB3987"
    2. (integer) 7
    3. "2019-01-01 00:01:07.0"
    4. "jingzhou"
    1. "AB3988"
    2. (integer) 8
    3. "2019-01-01 00:01:08.0"
    4. "jingzhou"
    1. "AB3989"
    2. (integer) 9
    3. "2019-01-01 00:01:09.0"
    4. "jingzhou"
    1. "AB3990"
    2. (integer) 10
    3. "2019-01-01 00:01:10.0"
    4. "jingzhou"
    1. "AD3981"
    2. (integer) 1
    3. "huangshi"
    4. "2019-01-01 00:01:01.0"
    1. "AD3982"
    2. (integer) 2
    3. "huangshi"
    4. "2019-01-01 00:01:02.0"
    1. "AD3983"
    2. (integer) 3
    3. "huangshi"
    4. "2019-01-01 00:01:03.0"
    1. "AD3984"
    2. (integer) 4
    3. "huangshi"
    4. "2019-01-01 00:01:04.0"
    1. "AD3985"
    2. (integer) 5
    3. "huangshi"
    4. "2019-01-01 00:01:05.0"
    1. "AD3986"
    2. (integer) 6
    3. "huangshi"
    4. "2019-01-01 00:01:06.0"
    1. "AD3987"
    2. (integer) 7
    3. "huangshi"
    4. "2019-01-01 00:01:07.0"
    1. "AD3988"
    2. (integer) 8
    3. "huangshi"
    4. "2019-01-01 00:01:08.0"
    1. "AD3989"
    2. (integer) 9
    3. "huangshi"
    4. "2019-01-01 00:01:09.0"
    1. "AD3990"
    2. (integer) 10
    3. "huangshi"
    4. "2019-01-01 00:01:10.0"

from redisql.

siscia avatar siscia commented on September 21, 2024

Hello,

can you please run this query?

REDISQL.EXEC DB "SELECT C_TS FROM C_KAKOU;"

Note that we are selecting only the C_TS column, not all.

Thanks,
Simone

from redisql.

dong524dong avatar dong524dong commented on September 21, 2024

After your sorting out, I seriously suspect that my code has a bug when inserting data, thank you very much!

from redisql.

siscia avatar siscia commented on September 21, 2024

SQLite has dynamic typing for the columns of the database. So the type that you declare is an invite, it is not really a constraint.

Sometimes is very useful, some time can end up in this kind of problem.

Cheers,
Simone

from redisql.

dong524dong avatar dong524dong commented on September 21, 2024

Thank you for your detailed answers. I have located a bug that caused me to be out of order when inserting data. Thanks again!

from redisql.

siscia avatar siscia commented on September 21, 2024

Great!

I will close the issue.

from redisql.

siscia avatar siscia commented on September 21, 2024

Aw congrats on opening your first issue on github!

from redisql.

Related Issues (20)

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.