|
1 | 1 | --- |
2 | 2 | permalink: faq |
3 | 3 | --- |
4 | | - |
5 | | -## Bug Fixing |
6 | | - |
7 | | -You find a bug when compiling? [Report it](https://github.com/zzzprojects/Eval-SQL.NET/issues) and it will be fixed usually within one business day. |
8 | | - |
9 | | -## Namespace |
10 | | - |
11 | | -All namespace support by SQL CLR are supported by Eval SQL.NET. |
12 | | - |
13 | | -[Supported .NET Framework Libraries](https://msdn.microsoft.com/en-us/library/ms403279.aspx) |
14 | | - |
15 | | - - CustomMarshalers |
16 | | - - Microsoft.VisualBasic |
17 | | - - Microsoft.VisualC |
18 | | - - mscorlib |
19 | | - - System |
20 | | - - System.Configuration |
21 | | - - System.Data |
22 | | - - System.Data.OracleClient |
23 | | - - System.Data.SqlXml |
24 | | - - System.Deployment |
25 | | - - System.Security |
26 | | - - System.Transactions |
27 | | - - System.Web.Services |
28 | | - - System.Xml |
29 | | - - System.Core.dll |
30 | | - - System.Xml.Linq.dll |
31 | | - - All common namespace and extensions method can be used without specifying the fullname. |
32 | | - |
33 | | -You can see the full list [here](https://github.com/zzzprojects/Eval-SQL.NET/blob/master/src/Z.Expressions.SqlServer.Eval/EvalContext/EvalContext.RegisterDefaultAlias.cs) |
34 | | - |
35 | | -Let us know if you believe we have missing some. |
36 | | - |
37 | | -## Performance |
38 | | - |
39 | | -You are worried about performance? Don't worry, Eval SQL.NET is super-fast and can evaluate over 150,000 expressions in a loop under one second and over 1,000,000 using a table! |
40 | | - |
41 | | -Result highly vary depending of your SQL Server performance and expression to evaluate. |
42 | | - |
43 | | -{% include template-example.html %} |
44 | | -{% highlight csharp %} |
45 | | - |
46 | | -DECLARE @startTime DATETIME, |
47 | | -@endTime DATETIME |
48 | | - |
49 | | -DECLARE @I INT = -1 |
50 | | -DECLARE @sqlnet SQLNET = SQLNET::New('i + 1') |
51 | | --- LET Compile the expression to check the compiled performance |
52 | | -SET @I = @sqlnet.Val('i', @I).EvalInt() |
53 | | - |
54 | | -SET @startTime = GETDATE() |
55 | | - |
56 | | -WHILE @I < 125000 |
57 | | - BEGIN |
58 | | - SET @I = @sqlnet.ValueInt('i', @I).EvalInt() |
59 | | - END |
60 | | - |
61 | | -SET @endTime = GETDATE() |
62 | | -PRINT 'StartTime = ' + CONVERT(VARCHAR(30), @startTime, 121) |
63 | | -PRINT 'EndTime = ' + CONVERT(VARCHAR(30), @endTime, 121) |
64 | | -PRINT 'Duration = ' + CONVERT(VARCHAR(30), @endTime - @starttime, 114) |
65 | | - |
66 | | -{% endhighlight %} |
67 | | - |
68 | | -## Security |
69 | | - |
70 | | -SQL CLR allow three type of permission: |
71 | | - |
72 | | - - SAFE |
73 | | - - EXTERNAL_ACCESS |
74 | | - - UNSAFE Eval SQL.NET support all types and is installed by default with SAFE permissions. Read more about [SQL CLR Permissions](https://msdn.microsoft.com/en-CA/library/ms345101.aspx) |
75 | | - |
76 | | -## SQL Injection |
77 | | - |
78 | | -This library allow to use parameter, so no SQL Injection is possible! |
79 | | - |
80 | | -However if you build the string to evaluate as you build a dynamic SQL, then there is nothing we can do for you. |
81 | | - |
82 | | -## Decimal throw an error! |
83 | | - |
84 | | -In C#, decimal must be suffixed with "m" to make them valid. By default "1.1" in C# is a double which cannot be added with decimal value. |
85 | | - |
86 | | -{% include template-example.html %} |
87 | | -{% highlight csharp %} |
88 | | - |
89 | | -// Trow exception |
90 | | -SELECT SQLNET::New('(x)+1.1234').Val('x', 1.1).Eval() |
91 | | - |
92 | | --- SELECT 2.2234 |
93 | | -SELECT SQLNET::New('(x)+1.1234m').Val('x', 1.1).Eval() |
94 | | -{% endhighlight %} |
| 4 | +## FAQ |
| 5 | + |
| 6 | +- [Contact Us](contact-us) |
| 7 | +- [Issue Tracker](issue-tracker) |
| 8 | +- [General](faq-general) |
| 9 | +- [Installation](faq-installation) |
| 10 | +- [License](faq-license) |
| 11 | +- [Eval SQL.NET](faq-eval-sql-net) |
0 commit comments