95,082 questions
0
votes
2
answers
420
views
Set up in-memory Sqlite database for testing in pest
I'm trying to set up testing using pest in a laravel project. I have several migrations which are stored in ./test/database/migrations, and I'd like to spin up a new sqlite in-memory database using ...
1
vote
0
answers
33
views
Qt 5.14.2 + SQLite3: Database locked when trying to drop temporary tables (COPYPL, COPYPL1)
I'm using Qt 5.14.2 with SQLite3. In the function below, I attempt to drop two temporary tables: "COPYPL" and "COPYPL1". Most of the time this works fine, but with some SQLite ...
1
vote
1
answer
26
views
SQLite inner join - UPDATE
I am trying to update some fields on results from an inner join. The select statement with the inner join works correctly. Unfortunately I am trying to replace statement by an update and I am getting ...
-1
votes
1
answer
78
views
Get all non-empty rows from one column and then get all matching rows for those values
I've built a program that converts an Excel sheet containing my departments schedule to a SQL table. We always work in pairs so I want to be able to check all my shifts and what person I'll be working ...
0
votes
1
answer
41
views
SQLite FTS, how to return only matching line in SQL?
I have a virtual full text search table in SQLite. I can query it like this.
select body from my_table where body match 'foo';
This works great to return an entire row that matches 'foo'.
However, my ...
0
votes
0
answers
95
views
How to fix `InvalidRequestError: Can't attach instance <ClassName at 0x7baada2f3cb0>` in SQLAlchemy relationships?
I have already gone through quite a few answers on SO (eg. this one and this one, but none of them seem to work for me.
I am using SQLAlchemy with sqlite, python 3.13.3. In case it matters, this is ...
2
votes
1
answer
52
views
How to create a table for every user to store timesheets data in Django
I am working on a timesheet application for a client. The User model in django is used for storing user data. But I am using a timesheet table to store User information related to the company (like ...
0
votes
1
answer
64
views
sqlite3.OperationalError: unable to open database file in virtual enviornment
I am trying to access a database named 'app.db' through sqlite3.connect() using a config with the URI of the file. I am also running this in a virtual enviornment and I am on windows.
Here is where I ...
0
votes
1
answer
61
views
Items getting dropped while adding a list to queue
I have a system where I am trying to achieve a single point of action for writing to a database. For this I am using Queues, I fetch a record from a queue and add to a list. Once I have a required ...
0
votes
0
answers
79
views
Monitoring Actual Bytes Written to Flash After SQLite Insert Operations
I am currently working on a project where I need to monitor the actual bytes written to flash storage after performing insert operations in an SQLite database. I've simplified my approach to the ...
0
votes
0
answers
48
views
sqlite3 in fasm x64 on Windows
By using 64-bit DLL (x64) for SQLite version from here and documentation from here i'm trying to use Sqlite in Fasm for of course quite reasonable reasons.
When trying to sqlite3_open a new db file ...
0
votes
0
answers
138
views
How to write large Parquet files (20GB+) to SQLite in batches using Polars?
I have the following Polars code that reads a Parquet file and writes it to an SQLite database:
data = pl.scan_parquet(get_dataset_path()).collect()
_ = data.write_database(
table_name="...
0
votes
1
answer
110
views
How can I query SQLite using the sqlight package?
I have a simple todos table in SQLite that I'm trying to query using Gleam. My code is as follows:
pub type Todo {
Todo(id: Int, title: String, completed: Int)
}
fn todo_encoder() -> decode....
0
votes
0
answers
58
views
VPS sqlite issue on hostinger server
I am writing webapplication in Next.js, Drizzle-orm, sqlite and tested it on local machine, its working without any issues but when I move to hostinger.com VPS server its not working.
It gives 500 ...
1
vote
0
answers
102
views
How can I suppress the output of a PRAGMA statement in sqlite?
I have a small, home-grown application that uses an sqlite database. Because multiple processes can (and do) try to update/insert at the same time, I receive a "database locked" error. I ...
0
votes
0
answers
189
views
Streamlit and Chroma DB issue: sqlite3.OperationalError: no such table: collections
I am creating a RAG application with streamlit and I am using Chroma DB to store my collections. Depending on the persist_collection parameter, I am using either chromadb.PersistentClient or chromadb....
2
votes
2
answers
77
views
Remove period from specific place
I have a SQLite table with a column num (data type: text)
1.100.00
2.3025.00
2.000.00
3.500.16
4.3124.00
I would like to remove the first period.
The column should then look like this:
1100.00
23025....
0
votes
0
answers
74
views
SQLITE & CHROMA:sqlite3.OperationalError: unable to open database file
@override
def connect(self, *args: Any, **kwargs: Any) -> Connection:
if hasattr(self._connection, "conn") and self._connection.conn is not None:
return self....
0
votes
1
answer
57
views
What can i do to make my sql based if statement run in my Jinja html template
I'm writting an employee calender website as a practice project but i can't get my SQL conditions to work
I have the following relevent code:
from flask import Flask, render_template, request, ...
0
votes
1
answer
77
views
System.IndexOutOfRangeException during SELECT output
I have this code in Visual Studio:
sqlite.Open(); //Initiate connection to the db
string stmEP = "select a.portata,a.quantita,b.QUANTITA_ATTUALE,a.COSTO_UNITARIO,a.SPESA_PORTATA from ORDINI a ...
0
votes
0
answers
35
views
How can I force my own app to release a lock over its SQLite DB file?
I am working on a MAUI application which uses sqlite-net-pcl as its ORM. When I try to delete the DB file from the app (System.IO.File.Delete(dbFilePath)) I get the following exception on Windows: ...
0
votes
1
answer
80
views
SQLite find primary keys in python
I am trying to describe the schema of this kaggle dataset.
Are there primary keys?
If there are primary keys, how do I figure out which they are?
Which columns are foreign keys?
# Reconnect to the ...
0
votes
0
answers
53
views
Determining which row causes IntegrityError exception when using cursor.executemany() to insert data
I am inserting a few thousand rows into a table with a UNIQUE constraint, using cursor.executemany(). On some occasions the data may have a duplicate which violates the constraint, and sqlite throws ...
0
votes
1
answer
108
views
`sqlite3 -echo` does not echo dot commands supplied on the command line
When I run sqlite3 interactively with the -echo option, every command I type gets echoed before its output, as expected:
$ sqlite3 -echo database.db
SQLite version 3.45.1 2024-01-30 16:01:20
Enter &...
2
votes
1
answer
44
views
jOOQ 3.19: Force Record column type for columns matching name format when performing .fetch()
I'm using jOOQ version 3.19 (unable to upgrade to 3.20 as currently on Java 17) and not the codegen library, just the plain org.jooq lib.
I'm reading from a SQLite database which has some Integer ...