Span Attribute

Aug 20, 2010 at 5:09 PM

Will SimpleSavant automatically figure out how many attribute values are available for storing the span content or is the attribute only be intended to be used with an entity that solely consists of an Id and a second property with the span attribute?

I.e. will this work:

public class Book
{
  [ItemName]
  public Guid Id { get; set; }

  public string Foo { get; set; }

  public string Bar { get; set; }
 
  [Span(false)]
  public string Content { get; set; }
 }
253 Attributes remaining for Content property?

Coordinator
Aug 20, 2010 at 8:39 PM

Savant doesn't attempt to calculate this for you. The number of attributes required to store a spanned value can vary greatly depending on compression, the character set being encoded (Amazon uses UTF8 which can require from 1-4 bytes per character), and (in the future) encryption of the data.

If you attempt to store more data for an item than Amazon allows you'll get an error back from SimpleDB.

Aug 20, 2010 at 8:44 PM

Ahh ok so SS will happily just append attributes until it hits an error. Fair enough and it allows for arbitrary entities like I've outlined above.