object CantonRequireTypes
Encapsulates those classes and their utility methods which enforce a given invariant via the use of require.
- Alphabetic
- By Inheritance
- CantonRequireTypes
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait AbstractLengthLimitedString extends AnyRef
This trait wraps a String that is limited to a certain maximum length.
This trait wraps a String that is limited to a certain maximum length. The canonical use case is ensuring that we don't write too long strings into the database.
You should normally implement LengthLimitedString or use its subclasses, for strings to be stored in standard string columns.
As this class implements fewer checks, this also serves as the basis for longer strings such as CLOBs.
- final case class InstanceName extends NoCopy with PrettyPrinting with Product with Serializable
- sealed trait LengthLimitedString extends AbstractLengthLimitedString
This trait wraps a String that is limited to a certain maximum length.
This trait wraps a String that is limited to a certain maximum length. Classes implementing this trait expose
create
andtryCreate
methods to safely (and non-safely) construct such a String.The canonical use case for LengthLimitedStrings is ensuring that we don't write too long strings into the database. This validation generally occurs on the server side and not on the client side. Concretely, this means that the Admin API and Ledger API gRPC services is the point where we validate that the received Protobuf Strings are not too long (and convert them into LengthLimitedStrings). On the client side, e.g. at the console, we generally take normal String types.
For longer strings, directly inherit from AbstractLengthLimitedString.
- trait LengthLimitedStringCompanion[A <: AbstractLengthLimitedString] extends AnyRef
Trait that implements method commonly needed in the companion object of an AbstractLengthLimitedString
- final case class LengthLimitedStringVar extends LengthLimitedString with Product with Serializable
- trait LengthLimitedStringWrapper extends AnyRef
Trait for case classes that are a wrapper around a LengthLimitedString.
Trait for case classes that are a wrapper around a LengthLimitedString.
- See also
com.digitalasset.canton.crypto.CertificateId for an example
- trait LengthLimitedStringWrapperCompanion[A <: LengthLimitedString, Wrapper <: LengthLimitedStringWrapper] extends AnyRef
Trait that implements utility methods to avoid boilerplate in the companion object of a case class that wraps a LengthLimitedString type using LengthLimitedStringWrapper.
Trait that implements utility methods to avoid boilerplate in the companion object of a case class that wraps a LengthLimitedString type using LengthLimitedStringWrapper.
- See also
com.digitalasset.canton.crypto.CertificateId for an example
- final case class NonEmptyString extends Product with Serializable
- final case class String1 extends LengthLimitedString with Product with Serializable
- final case class String100 extends LengthLimitedString with Product with Serializable
- final case class String185 extends LengthLimitedString with Product with Serializable
Limit used by com.digitalasset.canton.topology.UniqueIdentifier.
Limit used by com.digitalasset.canton.topology.UniqueIdentifier.
- See also
com.digitalasset.canton.topology.Identifier for documentation on its origin
- final case class String2066 extends AbstractLengthLimitedString with Product with Serializable
Length limitation for an com.digitalasset.canton.protocol.LfTemplateId.
Length limitation for an com.digitalasset.canton.protocol.LfTemplateId. A com.digitalasset.canton.protocol.LfTemplateId consists of
- The module name (com.digitalasset.daml.lf.data.Ref.DottedName)
- The template name (com.digitalasset.daml.lf.data.Ref.DottedName)
- The package ID
- Two separating dots Each com.digitalasset.daml.lf.data.Ref.DottedName can have 1000 chars (com.digitalasset.daml.lf.data.Ref.DottedName.maxLength). So a com.digitalasset.canton.protocol.LfTemplateId serializes to 1000 + 1000 + 64 + 2 = 2066 chars.
- final case class String255 extends LengthLimitedString with Product with Serializable
Default LengthLimitedString that should be used when in doubt.
Default LengthLimitedString that should be used when in doubt. 255 was chosen as it is also the limit used in the upstream code for, e.g., LedgerStrings in the upstream code
- final case class String256M extends AbstractLengthLimitedString with Product with Serializable
Length limitation of a
TEXT
or unboundedVARCHAR
field in postgres.Length limitation of a
TEXT
or unboundedVARCHAR
field in postgres.- Postgres
TEXT
orVARCHAR
support up to 1GB storage. That is at least2 ^ 28
characters in UTF8 encoding as each character needs at most 4 bytes.
TEXT
/VARCHAR
are only used for the following values (none are indices):- daml_packages.source_description
- topology_transactions.ignore_reason
- Postgres
- final case class String3 extends LengthLimitedString with Product with Serializable
Limit used for enum names.
- final case class String300 extends LengthLimitedString with Product with Serializable
Longest limited-length strings that have been needed so far.
Longest limited-length strings that have been needed so far. Typical use case: when a 255-length identifier is combined with other short suffixes or prefixes to further specialize them.
- See also
com.digitalasset.canton.store.db.SequencerClientDiscriminator
com.digitalasset.canton.crypto.KeyName
- final case class String36 extends LengthLimitedString with Product with Serializable
Limit used by a UUID.
- final case class String68 extends LengthLimitedString with Product with Serializable
Limit used by a hash (SHA256 in particular) in a com.digitalasset.canton.topology.UniqueIdentifier.
Limit used by a hash (SHA256 in particular) in a com.digitalasset.canton.topology.UniqueIdentifier.
- See also
com.digitalasset.canton.topology.UniqueIdentifier for documentation on its origin
- final case class String73 extends LengthLimitedString with Product with Serializable
Limit used by a com.digitalasset.canton.sequencing.protocol.MessageId.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object InstanceName extends Serializable
- object LengthLimitedString
- object NonEmptyString extends Serializable
- object String1 extends LengthLimitedStringCompanion[String1] with Serializable
- object String100 extends LengthLimitedStringCompanion[String100] with Serializable
- object String185 extends LengthLimitedStringCompanion[String185] with Serializable
- object String2066 extends LengthLimitedStringCompanion[String2066] with Serializable
- object String255 extends LengthLimitedStringCompanion[String255] with Serializable
- object String256M extends LengthLimitedStringCompanion[String256M] with Serializable
- object String3 extends LengthLimitedStringCompanion[String3] with Serializable
- object String300 extends LengthLimitedStringCompanion[String300] with Serializable
- object String36 extends LengthLimitedStringCompanion[String36] with Serializable
- object String68 extends LengthLimitedStringCompanion[String68] with Serializable
- object String73 extends LengthLimitedStringCompanion[String73] with Serializable