Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Fixed FluentColumn.ColumnSecondsUntilDeleted
Browse files Browse the repository at this point in the history
  • Loading branch information
bjuris committed Mar 8, 2012
1 parent 26b1f27 commit d74583a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FluentColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public TimeSpan? ColumnTimeUntilDeleted

if (value.HasValue)
ColumnSecondsUntilDeleted = Convert.ToInt32(value.Value.TotalSeconds);

ColumnSecondsUntilDeleted = null;
else
ColumnSecondsUntilDeleted = null;
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/Operations/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,16 @@ public static Mutation CreateInsertedOrChangedMutation(FluentMutation mutation)

public static Column CreateColumn(FluentColumn column)
{
return new Column {
var col = new Column {
Name = column.ColumnName.TryToBigEndian(),
Value = column.ColumnValue.TryToBigEndian(),
Timestamp = column.ColumnTimestamp.ToTimestamp()
};
if (column.ColumnSecondsUntilDeleted.HasValue)
{
col.Ttl = column.ColumnSecondsUntilDeleted.Value;
}
return col;
}

public static ColumnOrSuperColumn CreateColumnOrSuperColumn(IFluentBaseColumn column)
Expand Down

0 comments on commit d74583a

Please sign in to comment.