Exemplo n.º 1
0
 public bool Commit()
 {
     try
     {
         return(CommitQuery.Step((hasRow, reader, st) => true, (object)null));
     }
     finally
     {
         CommitQuery.Reset();
     }
 }
Exemplo n.º 2
0
 public bool Begin()
 {
     try
     {
         return(BeginQuery.Step((hasRow, reader, st) => true, (object)null));
     }
     finally
     {
         BeginQuery.Reset();
     }
 }
Exemplo n.º 3
0
 public bool Rollback()
 {
     try
     {
         return(RollbackQuery.Step((hasRow, reader, st) => true, (object)null));
     }
     finally
     {
         RollbackQuery.Reset();
     }
 }
            public List <MetadataRecord> FindMetadata(string path)
            {
                try
                {
                    FindMetadataQuery.Bind((binder, repo) =>
                    {
                        var zData = StringToHGlobalUTF8(repo, out var len);
                        if (binder.BindText(1, zData, len) != 0)
                        {
                            ThrowHelper.FailFast("Cannot bind repoPath");
                        }
                    }, path);

                    List <MetadataRecord> result = new List <MetadataRecord>();

                    while (FindMetadataQuery.Step((hasRow, reader, _) =>
                    {
                        if (hasRow)
                        {
                            var row = MapMetadataTableRow(reader);
                            result.Add(row);
                            return(true);
                        }
                        return(false);
                    }, (object)null)
                           )
                    {
                    }

                    return(result);
                }
                finally
                {
                    FindMetadataQuery.Reset();
                }
            }