Skip to content

Commit

Permalink
Will now show docs in update order, not insert order, will push updat…
Browse files Browse the repository at this point in the history
…ed docs to the fore.
  • Loading branch information
ayende committed May 14, 2010
1 parent 0dd2d01 commit ca5d3ee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions Raven.Database/Raven.Database.csproj
Expand Up @@ -105,6 +105,7 @@
<Compile Include="Exceptions\IndexDoesNotExists.cs" /> <Compile Include="Exceptions\IndexDoesNotExists.cs" />
<Compile Include="IStartupTask.cs" /> <Compile Include="IStartupTask.cs" />
<Compile Include="Json\JsonLuceneNumberConverter.cs" /> <Compile Include="Json\JsonLuceneNumberConverter.cs" />
<Compile Include="Plugins\Builtins\FilterRavenInternalDocumentsReadTrigger.cs" />
<Compile Include="Plugins\IIndexUpdateTrigger.cs" /> <Compile Include="Plugins\IIndexUpdateTrigger.cs" />
<Compile Include="Plugins\IReadTrigger.cs" /> <Compile Include="Plugins\IReadTrigger.cs" />
<Compile Include="Plugins\ReadOperation.cs" /> <Compile Include="Plugins\ReadOperation.cs" />
Expand Down
5 changes: 3 additions & 2 deletions Raven.Database/Storage/StorageActions/Documents.cs
Expand Up @@ -83,9 +83,10 @@ public JsonDocument DocumentByKey(string key, TransactionInformation transaction
}; };
} }


public IEnumerable<JsonDocument> GetDocumentsByReverseCreationOrder(Reference<bool> hasMore, int start) public IEnumerable<JsonDocument> GetDocumentsByReverseUpdateOrder(int start)
{ {
Api.MoveAfterLast(session, Documents); Api.JetSetCurrentIndex(session, Documents, "by_etag");
Api.MoveAfterLast(session, Documents);
for (int i = 0; i < start; i++) for (int i = 0; i < start; i++)
{ {
if(Api.TryMovePrevious(session,Documents) == false) if(Api.TryMovePrevious(session,Documents) == false)
Expand Down
12 changes: 12 additions & 0 deletions RavenDB.sln
Expand Up @@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Client.Lightweight",
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Tryouts", "Raven.Tryouts\Raven.Tryouts.csproj", "{68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Tryouts", "Raven.Tryouts\Raven.Tryouts.csproj", "{68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Smuggler", "Raven.Smuggler\Raven.Smuggler.csproj", "{3E6401AC-3E33-4B61-A460-49953654A207}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -143,6 +145,16 @@ Global
{68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|Mixed Platforms.Build.0 = Release|Any CPU {68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|x86.ActiveCfg = Release|Any CPU {68BC3141-C2EF-487A-B4A6-A0AD7E754FB1}.Release|x86.ActiveCfg = Release|Any CPU
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Any CPU.ActiveCfg = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Mixed Platforms.Build.0 = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|x86.ActiveCfg = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|x86.Build.0 = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Release|Any CPU.ActiveCfg = Release|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Release|Mixed Platforms.ActiveCfg = Release|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Release|Mixed Platforms.Build.0 = Release|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Release|x86.ActiveCfg = Release|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
Expand Down

0 comments on commit ca5d3ee

Please sign in to comment.