chronicler icon indicating copy to clipboard operation
chronicler copied to clipboard

DOCS: Improve documentation

Open fsanaulla opened this issue 7 years ago • 2 comments

If you have any ideas, how I can improve documentation - leave notes here. Feel free to open a PR.

fsanaulla avatar Sep 22 '17 20:09 fsanaulla

You are probably aware of it, but just to remind you if you aren't.

The example in README.md uses this class as a model:

case class Resume(
  @tag id: String,
  @tag candidateName: String,
  @tag candidateSurname: String,
  @field position: String,
  @field age: Option[Int],
  @field rate: Double,
  @timestamp created: Long
)

However, a snippet from macros module reveals that Option is only supported on tag values (which can only be Strings)

  private val TIMESTAMP_TYPE = tpdls[Long]

  private val SUPPORTED_TAGS_TYPES =
    Seq(tpdls[Option[String]], tpdls[String])

  final private val SUPPORTED_FIELD_TYPES =
    Seq(tpdls[Boolean], tpdls[Int], tpdls[Double], tpdls[String], tpdls[Float], TIMESTAMP_TYPE)

ioreskovic avatar Oct 28 '18 20:10 ioreskovic

It would be helpful to have sample comparing to the code using @tag scala-influxdb-client since many people will be familiar with it first. Like:

val point = Point("cpu", System.currentTimeMillis())
database.write(point,
               precision = Precision.MILLISECONDS,
               consistency = Consistency.ALL, 
               retentionPolicy = "custom_rp")

etc.

wpoosanguansit avatar Jan 19 '19 01:01 wpoosanguansit