is there a way to add REGEXP check constraints on a column? currently I get the following:
CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+'))
ERROR 9009: SQL prepare error: no such function: REGEXP in CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+')) at offset 54
CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+'))
ERROR 9009: SQL prepare error: no such function: REGEXP in CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+')) at offset 54
Nevermind... I just read "D1 will create read-only clones of your data and distribute across Cloudflare global network — close to where your users are — and constantly keep them up-to-date with changes."
i imagine its going to be price competitve but time will tell. If you are just starting a project i wouldn't really worry about which Database you chose as you can just manually copy over the tables and stuff when you are ready to release to the public with the database you want
seems like they are always cheaper than the competition. Like Bit.io is $1 per 100M operations... so cloudflare might be like like 25% of that if I compare KV and other products how they are priced?
nothing official from what I've seen, but my guess based on the models of KV and D1, is that D1 writes will be much cheaper than KV writes. I think of KV as behaving like a config file - frequent, simple reads, occasional writes, whereas D1 is a database, meant for complex queries, frequently, all the time
my guess is that the pricing model will be similar to R2, with operations being split up into classes (class A might be CREATE, DROP, ALTER etc, class B might be INSERT, DELETE, UPDATE, class C might be SELECT) depending on complexity and cost, which would depend on the internals of sqlite
I'm creating an experimental branch of my website on D1 to see how well it works, and when D1 goes GA and official pricing info comes out, I'll probably switch over to D1 entirely, but on the off-chance that D1 is prohibitively expensive, I'll just cut the experimental branch and keep us on our current solution
I was just using the dashboard interface to set up my tables, trying to INSERT INTO more than 2-3 values at a time causes a 500, and now whenever I load the list of tables I get 500 as well
CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+'))ERROR 9009: SQL prepare error: no such function: REGEXP in CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+')) at offset 54
CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+'))ERROR 9009: SQL prepare error: no such function: REGEXP in CREATE TABLE my_table (my_column TEXT CHECK(my_column REGEXP '\w+')) at offset 54