Skip to content

Commit

Permalink
pleasing the windows gods
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Tolmachev committed May 2, 2017
1 parent 88479ed commit 4333535
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ FsCassy offers several improvements over the official .NET driver:
- a composable DSL for statements,
- a Pretty printer, Cassandra and InMem statement interpreters

The pluggbale interpreter extends the reach of unit-testing into the code that would not otherwise be testable in isolation.
The pluggable interpreter extends the reach of unit-testing into the code that would not otherwise be testable in isolation.

=======

Some assembly required: please see the tests for examples of the interpreter construction.
4 changes: 3 additions & 1 deletion docs/content/index.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Samples & documentation
Contributing and copyright
--------------------------
The project is hosted on [GitHub][gh] where you can [report issues][issues], fork
the project and submit pull requests.
Expand All @@ -76,4 +75,7 @@ redistribution for both commercial and non-commercial purposes. For more informa
[issues]: https://github.com/Prolucid/FsCassy/issues
[readme]: https://github.com/Prolucid/FsCassy/blob/master/README.md
[license]: https://github.com/Prolucid/FsCassy/blob/master/LICENSE.md
Copyright 2017 Prolucid Technologies Inc
*)
4 changes: 4 additions & 0 deletions docs/content/tutorial.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ The Statement API directly reflects Cassandra operations, here are some of the e
*)

#r "FsCassy.dll"
#r "Cassandra.dll"
open FsCassy

type SomeMappedTable = {x:int}

let exampleWhere : Statement<SomeMappedTable,_> =
table
>>= where (Quote.X(fun x -> x.x = 0))
Expand Down Expand Up @@ -110,6 +112,7 @@ Cassandra driver and FsCassy API
========================
FsCassy exposes a small set of functions that make it easier to construct the relevant parts, thier use is completely optional:
- Cluster connectivity
- Session construction and parametrization
- LINQ Table construction
Expand All @@ -134,6 +137,7 @@ let xs = [ {x = 1}
{x = 5}
{x = 0}
{x = 6} ]

let ``InMem reads``() =
table >>= read
|> InMem.Interpreter.execute (ResizeArray xs)
Expand Down
30 changes: 30 additions & 0 deletions src/FsCassy.Tests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.4.14350" newVersion="2.6.4.14350" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.4.1.0" newVersion="4.4.1.0" />
</dependentAssembly>
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="LZ4" publicKeyToken="62e1b5ec1eec9bdd" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.15.93" />
</dependentAssembly>
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<Paket>True</Paket>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.1.1.0" />
</dependentAssembly>
</assemblyBinding></runtime>
</configuration>
10 changes: 6 additions & 4 deletions src/FsCassy.Tests/FsCassy.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<RootNamespace>FsCassy.Tests</RootNamespace>
<AssemblyName>FsCassy.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<Name>FsCassy.Tests</Name>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<NuGetPackageImportStamp>79ea8a22</NuGetPackageImportStamp>
Expand All @@ -31,19 +32,20 @@
<OutputPath>..\..\build_output\Tests</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\FsCassy.Tests.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CassandraTests.fs" />
<Compile Include="InMemTests.fs" />
<None Include="Script.fsx" />
<None Include="App.config" />
<None Include="paket.references" />
</ItemGroup>
<ItemGroup>
Expand All @@ -55,7 +57,7 @@
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
7 changes: 5 additions & 2 deletions src/FsCassy/FsCassy.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>d333f8c5-1914-4955-8ec1-5777d615b75e</ProjectGuid>
<OutputType>Library</OutputType>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand All @@ -33,7 +34,9 @@
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Security" />
</ItemGroup>
Expand All @@ -47,7 +50,7 @@
<Compile Include="AssemblyVersion.fs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.1\Framework\v4.0\Microsoft.FSharp.Targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
<ItemGroup>
Expand Down

0 comments on commit 4333535

Please sign in to comment.