Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one use SQLite in Perl 6?

Tags:

sqlite

raku

I want to start dabbling in Perl 6. A large percentage of my programming involves SQLite databases. It looks like work has been put into using SQLite in Perl 6, but most of the info I can find is old and vague.

I see a "perl6-sqlite" module here, but it's marked as [old] and has very little to it. I've also seen references to a new DBI based on something to do with Java, but most of that talk is from last year and it's unclear whether there's something that works.

So is there currently an accepted way to use SQLite within Perl 6?

like image 357
glibdud Avatar asked Sep 21 '11 14:09

glibdud


People also ask

What is SQLite and how it works?

SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC,ODBC e.t.c.

How do I connect to a SQLite database?

Select SQLite from the list. Give a Connection name for your own internal reference. For Database , click Choose a File and then select the database file on your local machine to which you want to connect. Hit Connect and you're all set!

When should you not use SQLite?

SQLite will normally work fine as the database backend to a website. But if the website is write-intensive or is so busy that it requires multiple servers, then consider using an enterprise-class client/server database engine instead of SQLite.

Is SQLite good enough for production?

The biggest problem with using SQLite in production is disaster recovery. If your server dies, so does your data. That's… not good. Other database servers have replication so they can stream database changes to another server in case one goes down.


1 Answers

(Updated 2015-01): DBIish from https://github.com/perl6/DBIish/ has decent support for SQLite and PostgreSQL, and limited support for mysql.

The README shows how to use it with an SQLite backend.

like image 176
moritz Avatar answered Sep 30 '22 20:09

moritz