Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Runtime/XSharp.VFP.Tests/MiscTests.prg
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ BEGIN NAMESPACE XSharp.VFP.Tests
METHOD PColTest() AS VOID
Assert.Equal(0, PCol())
END METHOD

[Fact, Trait("Category", "Database")];
METHOD TxnLevelTest() AS VOID
Assert.Equal(0, TxnLevel())
END METHOD
END CLASS

END NAMESPACE
12 changes: 12 additions & 0 deletions src/Runtime/XSharp.VFP/Database/DbFunctions.prg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ USING XSharp.RDD
USING System.Collections.Generic
USING XSharp.RDD.Support
USING XSharp.Internal

/// <summary>Internal transaction nesting level.
/// Incremented by BEGIN TRANSACTION, decremented
/// by END TRANSACTION/ROLLBACK
GLOBAL __FoxTnxLevel := 0 AS LONG

/// </summary>
/// <include file="VFPDocs.xml" path="Runtimefunctions/dbgetprop/*" />
/// <seealso cref="DbSetProp" />
/// <seealso cref="DbcDatabase" />
Expand Down Expand Up @@ -554,6 +561,11 @@ FUNCTION Seek(uExpression, uWorkarea, uOrder) AS LOGIC CLIPPER
END IF
RETURN lResult

/// <include file="VFPDocs.xml" path="Runtimefunctions/txnlevel/*" />
[FoxProFunction("TXNLEVEL", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Full, FoxCriticality.High)];
FUNCTION TxnLevel( ) AS LONG
RETURN __FoxTnxLevel

FUNCTION DbCopyStructFox(cTargetFile, aFields, lCdx) AS LOGIC CLIPPER
local acStruct as ARRAY
IF IsArray(aFields)
Expand Down
8 changes: 0 additions & 8 deletions src/Runtime/XSharp.VFP/ToDo-TUVWX.prg
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ FUNCTION TableUpdate( nRows , lForce , uArea , cErrorArray) AS LOGIC
THROW NotImplementedException{}
// RETURN FALSE


/// <summary>-- todo --</summary>
/// <include file="VFPDocs.xml" path="Runtimefunctions/txnlevel/*" />
[FoxProFunction("TXNLEVEL", FoxFunctionCategory.Database, FoxEngine.SQL, FoxFunctionStatus.Stub, FoxCriticality.High)];
FUNCTION TxnLevel( ) AS LONG
THROW NotImplementedException{}
// RETURN 0

/// <summary>-- todo --</summary>
/// <include file="VFPDocs.xml" path="Runtimefunctions/txtwidth/*" />
[FoxProFunction("TXTWIDTH", FoxFunctionCategory.UIAndWindow, FoxEngine.UI, FoxFunctionStatus.Stub, FoxCriticality.Medium)];
Expand Down
Loading