Overby.LINQPad.FileDriver
0.0.1-alpha3
See the version list below for details.
dotnet add package Overby.LINQPad.FileDriver --version 0.0.1-alpha3
NuGet\Install-Package Overby.LINQPad.FileDriver -Version 0.0.1-alpha3
<PackageReference Include="Overby.LINQPad.FileDriver" Version="0.0.1-alpha3" />
paket add Overby.LINQPad.FileDriver --version 0.0.1-alpha3
#r "nuget: Overby.LINQPad.FileDriver, 0.0.1-alpha3"
// Install Overby.LINQPad.FileDriver as a Cake Addin #addin nuget:?package=Overby.LINQPad.FileDriver&version=0.0.1-alpha3&prerelease // Install Overby.LINQPad.FileDriver as a Cake Tool #tool nuget:?package=Overby.LINQPad.FileDriver&version=0.0.1-alpha3&prerelease
Overby.LINQPad.FileDriver
What's it do?
This driver allows you to define a connection and point it to a folder full of data files (csv only for now). A datacontext will be generated so that you can query the files in the folder. Each file in the folder will have a class generated for it. Each property in the generated class will have the type that best fits the data in the file.
Kind of like an F# type provider? - Michael Ciccotti
Yes. Kind of like that.
Installation
The driver isn't yet available in the normal distribution channels for Linqpad 5/6, the driver registry and nuget, respectively. That will happen soon. For now, go to this repo's releases page and download the appropriate release, .lpx
for LINQPad 5 and *.lpx6
for LINQPad 6.
In LINQPad, click Add Connection
and then View more drivers...
.
In version 5, click Browse...
and select the .lpx
file. For version 6, click Install driver from .LPX6 file...
and select the .lpx6
file.
Configuration
Once installed, click Add Connection
. Select Overby File Driver
and click Next >
.
The dialog connection will be displayed. Supply a folder and a name for the connection.
Gotchas
- CSV only for now. More file types will be supported.
- The first line of each csv file will be treated as a header. Each value in that line will be the name of a property on the generated class. Support for headerless files will be added. For now just add a header line if it's missing, ya dingus!
- "I don't see my file in the explorer!"
- Sub directories are not recursed. Ensure the file is in the top level. Recursion support will be added.
- The file needs a
.csv
extension. - Refresh the connection for newly added files.
- "Populating the connection is slow!"
- Code is being generated and compiled during every connection refresh.
- Each file's MD5 hash is computed during population.
- New/changed files are scanned to find best-fitting types for properties.
- The larger the file, the slower the type scanning.
- The more files, the slower the hashing.
- Mitigations:
- Type scanning results are cached.
- Multiple files are hashed/type scanned in parallel.
- "What is this disgusting
.5f969db29db8fe4dbd4738bf85c80219
folder!? YUCK!"- That's the cache. Don't mess with that.
- The name was chosen to avoid conflicts.
- "I found a bug!"
- Good. Let me know about it.
- "I have an idea!"
- Good. Let me know about it.
Todo
- Cleanup messy code (I built this thing quickly)
- CI/CD
- Enum support for generated types
- Support more file types
- tsv
- any delimiter
- xls
- fixed width "flat files"
- json
- xml
- Faster code-gen
- More short-circuiting during type scanning
- Edit/Save support
- Directory recursion
- Make build dependencies available on nuget
- Support CSV files without a header line
- Utilities for easily writing files to the folder
- Auto populate when a query writes to the folder
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 3.0
- LINQPad.Reference (>= 1.1.0)
- Overby.Extensions.Text (>= 1.0.0-beta1)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.6
- LINQPad.Reference (>= 1.1.0)
- Overby.Extensions.Text (>= 1.0.0-beta1)
- System.ValueTuple (>= 4.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.1-alpha7 | 374 | 11/19/2020 |
0.0.1-alpha6 | 364 | 6/10/2020 |
0.0.1-alpha5 | 341 | 4/28/2020 |
0.0.1-alpha4 | 278 | 4/27/2020 |
0.0.1-alpha3 | 299 | 4/14/2020 |
Initial nuget release.