Class TypeClient

java.lang.Object
io.stargate.sdk.rest.TypeClient

public class TypeClient extends Object
Working with UDT.
Author:
Cedrick LUNVEN (@clunven)
  • Field Details

  • Constructor Details

    • TypeClient

      public TypeClient(LoadBalancedHttpClient stargateHttpClient, KeyspaceClient keyspaceClient, String typeName)
      Full constructor.
      Parameters:
      stargateHttpClient - stargateHttpClient
      keyspaceClient - KeyspaceClient
      typeName - String
  • Method Details

    • find

      public Optional<TypeDefinition> find()
      Get metadata of the collection. There is no dedicated resources we use the list and filter with what we need.
      Returns:
      metadata of the collection if its exist or empty
    • exist

      public boolean exist()
      Check if the table exist.
      Returns:
      boolean
    • create

      public void create(CreateType tcr)
      Create a type.
      Parameters:
      tcr - creation request
      See Also:
    • update

      public void update(UpdateType update)
      updateOptions
      Parameters:
      update - to TableOptions
      See Also:
    • delete

      public void delete()
      Delete a type
      See Also:
    • getTypeName

      public String getTypeName()
      Getter accessor for attribute 'tableName'.
      Returns:
      current value of 'tableName'