piskvorky / sqlitedict

Persistent dict, backed by sqlite3 and pickle, multithread-safe.
Apache License 2.0
1.16k stars 130 forks source link

Can I write to a sqlite database without knowing the row number #172

Closed pranavlal closed 1 year ago

pranavlal commented 1 year ago

I am a new user of SqliteDict. I am confused about one part. In my program, several threads will write to the same table. I do not know the row number so cannot do product[1]={"name":value}

Can I write to the database without specifying any numbers?

piskvorky commented 1 year ago

Sqlitedict acts as a dict, and the keys are expected to be strings. See the README for examples: https://github.com/RaRe-Technologies/sqlitedict#usage