I spent a few minutes with the SQLite binaries and examples from Jim and Chrissy, and simply duct-taped SQLite functionality onto Invoke-Sqlcmd2. NET logic to provide simplified SQL queries, the ability to handle SQL parameters, PowerShell-esque behavior for DBNull, and other conveniences. I was looking for something similar to Invoke-Sqlcmd2, which abstracts out the underlying. We can concentrate on doing what we want to do, not the underlying implementation. The task-based nature of PowerShell makes it a great language for getting things done. I’m also a fan of abstraction, and building re-usable, simple to use tools. I generally prefer standalone functions and cmdlets over providers. There are other examples abound, including interesting solutions like Chrissy LeMaire’s Invoke-Locate, which leverage SQLite behind the scenes. If you like working with providers and PSDrives, this is probably as far as you need to go. Looking around, you’ll stumble upon Jim Christopher’s SQLite PowerShell Provider. What do you know, sounds pretty close to what we are looking for! We want to use this in PowerShell, so where do we start? SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Wouldn’t it be great if we could illustrate how to use SQL, and get an idea of how helpful it can be, without the prerequisite of an existing instance with appropriate configurations and access in place? SQLite Will they have an existing SQL instance they can work with? Will they have access to it? Will they run into a grumpy DBA? Will they be scared off by the idea of standing up their own SQL instance for testing and learning? Every time I start writing about these, I end up spending a good deal of time writing about MSSQL, and thinking of all the potential caveats that might scare off the uninitiated. I’ve been planning on sharing some fun projects that involve SQL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |