text:
[Kony](http://www.kony.com/) application using the [Marvel Comics API](http://developer.marvel.com/).

## Setup
* Clone the repository

`$ git clone https://github.com/danguilherme/marvel-comics-kony.git`

* Enter in repository folder

`$ cd marvel-comics-kony`

* **Visualizer Project**
	* **Mac OS X**
	  * Close Visualizer, if it's opened

	  * Create symlink in Kony Visualizer workspace pointing to the project inside this repo (Kony Visualizer's workspace [cannot be changed](https://www.linkedin.com/grp/post/4981807-6012212004817752065))

	  `$ ln -s {Absolute path for your repository}/visualizer/ {Absolute path for Kony Visualizer workspace}/Marvel`

	  * Open Visualizer and change to project "Marvel"

* **Studio Project**
  * **Mac OS X**
    * Create symlink in Kony Studio workspace pointing to the project inside this repo

	  `$ ln -s {Absolute path for your repository}/studio/ {Absolute path for Kony Studio workspace}/Marvel`

    * Open Studio.
    * Select menu `File > Import...`
    * On Import modal, select `General > Existing projects into Workspace`
    * Click Next
    * On Select root directory, click on `Browse...` and select the symlink folder created in the first step
    * Click Finish


text:
namespace King.Service.Tests.Unit.Data
{
    using global::Azure.Data.Wrappers;
    using System;
    using King.Service.Data;
    using NUnit.Framework;

    [TestFixture]
    public class QueueSetupTests
    {
        [Test]
        public void Constructor()
        {
            new QueueSetup<object>();
        }

        [Test]
        public void IsIQueueSetup()
        {
            Assert.IsNotNull(new QueueSetup<object>() as IQueueSetup<object>);
        }

        [Test]
        public void Name()
        {
            var expected = Guid.NewGuid().ToString();
            var qc = new QueueSetup<object>()
            {
                Name = expected,
            };

            Assert.AreEqual(expected, qc.Name);
        }

        [Test]
        public void Priority()
        {
            var expected = QueuePriority.High;
            var qc = new QueueSetup<object>()
            {
                Priority = expected,
            };

            Assert.AreEqual(expected, qc.Priority);
        }

        [Test]
        public void Processor()
        {
            Func<IProcessor<object>> expected = () => { return null; };
            var qc = new QueueSetup<object>()
            {
                Processor = expected,
            };

            Assert.AreEqual(expected, qc.Processor);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
ATerm SSL_mkterm(ATerm, ATerm) ;
ATerm SSL_explode_term(ATerm) ;
ATerm SSL_get_constructor(ATerm) ;
ATerm SSL_get_arguments(ATerm) ;
ATerm SSL_get_appl_arguments_map(StrCL, ATerm) ;
ATerm SSL_address_lt(ATerm, ATerm) ;
ATerm SSL_address(ATerm) ;
ATerm SSL_checksum(ATerm) ;


text:
// This is a generated file. Not intended for manual editing.
package com.intellij.lang.psi;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;

public interface YangInstanceIdentifierSpecification extends PsiElement {

  @Nullable
  YangRequireInstanceStmt getRequireInstanceStmt();

}


text:
#define PROTOTYPE
/**
 *	This script demonstrates how one might use the OnproBuilderObjectCreated delegate.
 */

// Uncomment this line to enable this script.
// #define PROBUILDER_API_EXAMPLE

#if PROBUILDER_API_EXAMPLE

using UnityEngine;
using UnityEditor;
using System.Collections;
using ProBuilder2.Common;
using ProBuilder2.EditorCommon;

[InitializeOnLoad]
public class RenameNewObjects : Editor
{
	/**
	 *	Static constructor is called and subscribes to the OnProBuilderObjectCreated delegate.
	 */
	static RenameNewObjects()
	{
		pb_EditorUtility.AddOnObjectCreatedListener(OnProBuilderObjectCreated);
	}

	~RenameNewObjects()
	{
		pb_EditorUtility.RemoveOnObjectCreatedListener(OnProBuilderObjectCreated);
	}

	/**
	 *	When a new object is created this function is called with a reference to the pb_Object
	 *	last built.
	 */
	static void OnProBuilderObjectCreated(pb_Object pb)
	{
		pb.gameObject.name = string.Format("pb_{0}{1}", pb.gameObject.name, pb.GetInstanceID());
	}
}

#endif


text:
package com.amazonaws.services.iot.model;

import java.io.Serializable;
import javax.annotation.Generated;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDynamicThingGroupResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * The dynamic thing group name.
     *

     */
    private String thingGroupName;
    /**
     *

     * The dynamic thing group ARN.
     *

     */
    private String thingGroupArn;
    /**
     *

     * The dynamic thing group ID.
     *

     */
    private String thingGroupId;
    /**
     *

     * The dynamic thing group index name.
     *

     */
    private String indexName;
    /**
     *

     * The dynamic thing group search query string.
     *

     */
    private String queryString;
    /**
     *

     * The dynamic thing group query version.
     *

     */
    private String queryVersion;

    /**
     *

     * The dynamic thing group name.
     *

     *
     * @param thingGroupName
     *        The dynamic thing group name.
     */

    public void setThingGroupName(String thingGroupName) {
        this.thingGroupName = thingGroupName;
    }

    /**
     *

     * The dynamic thing group name.
     *

     *
     * @return The dynamic thing group name.
     */

    public String getThingGroupName() {
        return this.thingGroupName;
    }

    /**
     *

     * The dynamic thing group name.
     *

     *
     * @param thingGroupName
     *        The dynamic thing group name.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withThingGroupName(String thingGroupName) {
        setThingGroupName(thingGroupName);
        return this;
    }

    /**
     *

     * The dynamic thing group ARN.
     *

     *
     * @param thingGroupArn
     *        The dynamic thing group ARN.
     */

    public void setThingGroupArn(String thingGroupArn) {
        this.thingGroupArn = thingGroupArn;
    }

    /**
     *

     * The dynamic thing group ARN.
     *

     *
     * @return The dynamic thing group ARN.
     */

    public String getThingGroupArn() {
        return this.thingGroupArn;
    }

    /**
     *

     * The dynamic thing group ARN.
     *

     *
     * @param thingGroupArn
     *        The dynamic thing group ARN.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withThingGroupArn(String thingGroupArn) {
        setThingGroupArn(thingGroupArn);
        return this;
    }

    /**
     *

     * The dynamic thing group ID.
     *

     *
     * @param thingGroupId
     *        The dynamic thing group ID.
     */

    public void setThingGroupId(String thingGroupId) {
        this.thingGroupId = thingGroupId;
    }

    /**
     *

     * The dynamic thing group ID.
     *

     *
     * @return The dynamic thing group ID.
     */

    public String getThingGroupId() {
        return this.thingGroupId;
    }

    /**
     *

     * The dynamic thing group ID.
     *

     *
     * @param thingGroupId
     *        The dynamic thing group ID.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withThingGroupId(String thingGroupId) {
        setThingGroupId(thingGroupId);
        return this;
    }

    /**
     *

     * The dynamic thing group index name.
     *

     *
     * @param indexName
     *        The dynamic thing group index name.
     */

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    /**
     *

     * The dynamic thing group index name.
     *

     *
     * @return The dynamic thing group index name.
     */

    public String getIndexName() {
        return this.indexName;
    }

    /**
     *

     * The dynamic thing group index name.
     *

     *
     * @param indexName
     *        The dynamic thing group index name.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withIndexName(String indexName) {
        setIndexName(indexName);
        return this;
    }

    /**
     *

     * The dynamic thing group search query string.
     *

     *
     * @param queryString
     *        The dynamic thing group search query string.
     */

    public void setQueryString(String queryString) {
        this.queryString = queryString;
    }

    /**
     *

     * The dynamic thing group search query string.
     *

     *
     * @return The dynamic thing group search query string.
     */

    public String getQueryString() {
        return this.queryString;
    }

    /**
     *

     * The dynamic thing group search query string.
     *

     *
     * @param queryString
     *        The dynamic thing group search query string.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withQueryString(String queryString) {
        setQueryString(queryString);
        return this;
    }

    /**
     *

     * The dynamic thing group query version.
     *

     *
     * @param queryVersion
     *        The dynamic thing group query version.
     */

    public void setQueryVersion(String queryVersion) {
        this.queryVersion = queryVersion;
    }

    /**
     *

     * The dynamic thing group query version.
     *

     *
     * @return The dynamic thing group query version.
     */

    public String getQueryVersion() {
        return this.queryVersion;
    }

    /**
     *

     * The dynamic thing group query version.
     *

     *
     * @param queryVersion
     *        The dynamic thing group query version.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CreateDynamicThingGroupResult withQueryVersion(String queryVersion) {
        setQueryVersion(queryVersion);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getThingGroupName() != null)
            sb.append("ThingGroupName: ").append(getThingGroupName()).append(",");
        if (getThingGroupArn() != null)
            sb.append("ThingGroupArn: ").append(getThingGroupArn()).append(",");
        if (getThingGroupId() != null)
            sb.append("ThingGroupId: ").append(getThingGroupId()).append(",");
        if (getIndexName() != null)
            sb.append("IndexName: ").append(getIndexName()).append(",");
        if (getQueryString() != null)
            sb.append("QueryString: ").append(getQueryString()).append(",");
        if (getQueryVersion() != null)
            sb.append("QueryVersion: ").append(getQueryVersion());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof CreateDynamicThingGroupResult == false)
            return false;
        CreateDynamicThingGroupResult other = (CreateDynamicThingGroupResult) obj;
        if (other.getThingGroupName() == null ^ this.getThingGroupName() == null)
            return false;
        if (other.getThingGroupName() != null && other.getThingGroupName().equals(this.getThingGroupName()) == false)
            return false;
        if (other.getThingGroupArn() == null ^ this.getThingGroupArn() == null)
            return false;
        if (other.getThingGroupArn() != null && other.getThingGroupArn().equals(this.getThingGroupArn()) == false)
            return false;
        if (other.getThingGroupId() == null ^ this.getThingGroupId() == null)
            return false;
        if (other.getThingGroupId() != null && other.getThingGroupId().equals(this.getThingGroupId()) == false)
            return false;
        if (other.getIndexName() == null ^ this.getIndexName() == null)
            return false;
        if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false)
            return false;
        if (other.getQueryString() == null ^ this.getQueryString() == null)
            return false;
        if (other.getQueryString() != null && other.getQueryString().equals(this.getQueryString()) == false)
            return false;
        if (other.getQueryVersion() == null ^ this.getQueryVersion() == null)
            return false;
        if (other.getQueryVersion() != null && other.getQueryVersion().equals(this.getQueryVersion()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getThingGroupName() == null) ? 0 : getThingGroupName().hashCode());
        hashCode = prime * hashCode + ((getThingGroupArn() == null) ? 0 : getThingGroupArn().hashCode());
        hashCode = prime * hashCode + ((getThingGroupId() == null) ? 0 : getThingGroupId().hashCode());
        hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
        hashCode = prime * hashCode + ((getQueryString() == null) ? 0 : getQueryString().hashCode());
        hashCode = prime * hashCode + ((getQueryVersion() == null) ? 0 : getQueryVersion().hashCode());
        return hashCode;
    }

    @Override
    public CreateDynamicThingGroupResult clone() {
        try {
            return (CreateDynamicThingGroupResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
'use strict';

import { module } from 'angular';

import { ModalWizard } from '@spinnaker/core';

export const AZURE_SERVERGROUP_CONFIGURE_WIZARD_SECURITYGROUP_SERVERGROUPSECURITYGROUPS_CONTROLLER =
  'spinnaker.azure.serverGroup.configure.securityGroups.controller';
export const name = AZURE_SERVERGROUP_CONFIGURE_WIZARD_SECURITYGROUP_SERVERGROUPSECURITYGROUPS_CONTROLLER; // for backwards compatibility
module(AZURE_SERVERGROUP_CONFIGURE_WIZARD_SECURITYGROUP_SERVERGROUPSECURITYGROUPS_CONTROLLER, []).controller(
  'azureServerGroupSecurityGroupsCtrl',
  [
    '$scope',
    function($scope) {
      ModalWizard.markClean('security-groups');
      ModalWizard.markComplete('security-groups');

      $scope.command.selectedSecurityGroup = {
        id: $scope.command.securityGroupName,
      };

      this.securityGroupChanged = function(securityGroup) {
        $scope.command.securityGroupName = securityGroup.id;
        ModalWizard.markComplete('security-groups');
      };
    },
  ],
);


text:
@interface SCBlurOverlayView : UIView
@property (nonatomic, assign) CGFloat radius;
@property (nonatomic, assign) CGPoint circleCenter;
@end


text:
package io.nlopez.smartadapters.adapters;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.util.List;

import io.nlopez.smartadapters.builders.BindableLayoutBuilder;
import io.nlopez.smartadapters.builders.DefaultBindableLayoutBuilder;
import io.nlopez.smartadapters.utils.Mapper;
import io.nlopez.smartadapters.utils.ThreadHelper;
import io.nlopez.smartadapters.utils.ViewEventListener;
import io.nlopez.smartadapters.views.BindableLayout;

/**
 * Adapter for {@code AbsListView} based widgets
 */
public class MultiAdapter extends BaseAdapter {

    protected Mapper mapper;
    protected List listItems;
    protected ViewEventListener viewEventListener;
    protected BindableLayoutBuilder builder;

    public MultiAdapter(Mapper mapper, List listItems) {
        this(mapper, listItems, createDefaultBuilder());
    }

    public MultiAdapter(Mapper mapper, List listItems, BindableLayoutBuilder builder) {
        this.listItems = listItems;
        this.mapper = mapper;
        if (builder == null) {
            this.builder = createDefaultBuilder();
        } else {
            this.builder = builder;
        }
    }

    public void setItems(List items) {
        ThreadHelper.crashIfBackgroundThread();
        listItems = items;
        notifyDataSetChanged();
    }

    public void addItem(Object item) {
        ThreadHelper.crashIfBackgroundThread();
        listItems.add(item);
        notifyDataSetChanged();
    }

    public void delItem(Object item) {
        ThreadHelper.crashIfBackgroundThread();
        listItems.remove(item);
        notifyDataSetChanged();
    }

    public void addItems(List items) {
        ThreadHelper.crashIfBackgroundThread();
        listItems.addAll(items);
        notifyDataSetChanged();
    }

    public void clearItems() {
        ThreadHelper.crashIfBackgroundThread();
        listItems.clear();
        notifyDataSetChanged();
    }

    public ViewEventListener getViewEventListener() {
        return viewEventListener;
    }

    public void setViewEventListener(ViewEventListener viewEventListener) {
        this.viewEventListener = viewEventListener;
    }

    public void notifyAction(int actionId, Object object, int position, View view) {
        if (viewEventListener != null) {
            viewEventListener.onViewEvent(actionId, object, position, view);
        }
    }

    @Override
    public int getItemViewType(int position) {
        if (listItems == null) {
            return 0;
        }
        Object object = getItem(position);
        if (mapper.containsObjectClass(object.getClass())) {
            return mapper.position(object.getClass());
        } else {
            return 0;
        }
    }

    @Override
    public int getViewTypeCount() {
        return mapper.size();
    }

    @Override
    public int getCount() {
        return listItems == null ? 0 : listItems.size();
    }

    @Override
    public Object getItem(int position) {
        return listItems == null ? null : listItems.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        BindableLayout viewGroup = (BindableLayout) convertView;
        if (viewGroup == null) {
            viewGroup = builder.build(parent, mapper, getItem(position).getClass(), getItem(position));
        }

        if (viewGroup != null) {
            viewGroup.setViewEventListener(viewEventListener);
            viewGroup.bind(getItem(position), position);
        }
        return viewGroup;
    }

    private static BindableLayoutBuilder createDefaultBuilder() {
        return new DefaultBindableLayoutBuilder();
    }
}


text:
namespace swift {

class ArchetypeBuilder;
class ProtocolConformanceRef;
class ProtocolType;
class Substitution;
class SubstitutionMap;

/// Describes the generic signature of a particular declaration, including
/// both the generic type parameters and the requirements placed on those
/// generic parameters.
class alignas(1 << TypeAlignInBits) GenericSignature final
  : public llvm::FoldingSetNode,
    private llvm::TrailingObjects<GenericSignature, GenericTypeParamType *,
                                  Requirement> {
  friend TrailingObjects;

  unsigned NumGenericParams;
  unsigned NumRequirements;

  // Make vanilla new/delete illegal.
  void *operator new(size_t Bytes) = delete;
  void operator delete(void *Data) = delete;

  size_t numTrailingObjects(OverloadToken<GenericTypeParamType *>) const {
    return NumGenericParams;
  }
  size_t numTrailingObjects(OverloadToken<Requirement>) const {
    return NumRequirements;
  }

  /// Retrieve a mutable version of the generic parameters.
  MutableArrayRef<GenericTypeParamType *> getGenericParamsBuffer() {
    return {getTrailingObjects<GenericTypeParamType *>(), NumGenericParams};
  }

  /// Retrieve a mutable version of the requirements.
  MutableArrayRef<Requirement> getRequirementsBuffer() {
    return {getTrailingObjects<Requirement>(), NumRequirements};
  }

  GenericSignature(ArrayRef<GenericTypeParamType *> params,
                   ArrayRef<Requirement> requirements,
                   bool isKnownCanonical);

  mutable llvm::PointerUnion<GenericSignature *, ASTContext *>
    CanonicalSignatureOrASTContext;

  static ASTContext &getASTContext(ArrayRef<GenericTypeParamType *> params,
                                   ArrayRef<Requirement> requirements);

  /// Retrieve the archetype builder for the given generic signature.
  ArchetypeBuilder *getArchetypeBuilder(ModuleDecl &mod);

  friend class ArchetypeType;

public:
  /// Create a new generic signature with the given type parameters and
  /// requirements.
  static GenericSignature *get(ArrayRef<GenericTypeParamType *> params,
                               ArrayRef<Requirement> requirements,
                               bool isKnownCanonical = false);

  /// Create a new generic signature with the given type parameters and
  /// requirements, first canonicalizing the types.
  static CanGenericSignature getCanonical(ArrayRef<GenericTypeParamType *> params,
                                          ArrayRef<Requirement> requirements);

  /// Retrieve the generic parameters.
  ArrayRef<GenericTypeParamType *> getGenericParams() const {
    return const_cast<GenericSignature *>(this)->getGenericParamsBuffer();
  }

  /// Retrieve the innermost generic parameters.
  ///
  /// Given a generic signature for a nested generic type, produce an
  /// array of the generic parameters for the innermost generic type.
  ArrayRef<GenericTypeParamType *> getInnermostGenericParams() const;

  /// Retrieve the requirements.
  ArrayRef<Requirement> getRequirements() const {
    return const_cast<GenericSignature *>(this)->getRequirementsBuffer();
  }

  /// Check if the generic signature makes all generic parameters
  /// concrete.
  bool areAllParamsConcrete() const {
    auto iter = getAllDependentTypes();
    return iter.begin() == iter.end();
  }

  /// Only allow allocation by doing a placement new.
  void *operator new(size_t Bytes, void *Mem) {
    assert(Mem);
    return Mem;
  }

  /// Build an interface type substitution map from a vector of Substitutions
  /// that correspond to the generic parameters in this generic signature.
  SubstitutionMap getSubstitutionMap(ArrayRef<Substitution> args) const;

  /// Same as above, but updates an existing map.
  void getSubstitutionMap(ArrayRef<Substitution> args,
                          SubstitutionMap &subMap) const;

  using GenericFunction = auto(CanType canType, Type conformingReplacementType,
    ProtocolType *conformedProtocol)
    ->Optional<ProtocolConformanceRef>;
  using LookupConformanceFn = llvm::function_ref<GenericFunction>;

  /// Build an array of substitutions from an interface type substitution map,
  /// using the given function to look up conformances.
  void getSubstitutions(TypeSubstitutionFn substitution,
                        LookupConformanceFn lookupConformance,
                        SmallVectorImpl<Substitution> &result) const;

  /// Build an array of substitutions from an interface type substitution map,
  /// using the given function to look up conformances.
  void getSubstitutions(const TypeSubstitutionMap &subMap,
                        LookupConformanceFn lookupConformance,
                        SmallVectorImpl<Substitution> &result) const;

  /// Build an array of substitutions from an interface type substitution map,
  /// using the given function to look up conformances.
  void getSubstitutions(const SubstitutionMap &subMap,
                        SmallVectorImpl<Substitution> &result) const;

  /// Return a range that iterates through all of the types that require
  /// substitution, which includes the generic parameter types as well as
  /// other dependent types that require additional conformances.
  SmallVector<Type, 4> getAllDependentTypes() const;

  /// Enumerate all of the dependent types in the type signature that will
  /// occur in substitution lists (in order), along with the set of
  /// conformance requirements placed on that dependent type.
  ///
  /// \param fn Callback function that will receive each (type, requirements)
  /// pair, in the order they occur within a list of substitutions. If this
  /// returns \c true, the enumeration will be aborted.
  ///
  /// \returns true if any call to \c fn returned \c true, otherwise \c false.
  bool enumeratePairedRequirements(
         llvm::function_ref<bool(Type, ArrayRef<Requirement>)> fn) const;

  /// Determines whether this GenericSignature is canonical.
  bool isCanonical() const;

  ASTContext &getASTContext() const;

  /// Canonicalize the components of a generic signature.
  CanGenericSignature getCanonicalSignature() const;

  /// Uniquing for the ASTContext.
  void Profile(llvm::FoldingSetNodeID &ID) {
    Profile(ID, getGenericParams(), getRequirements());
  }

  /// Determine whether the given dependent type is required to be a class.
  bool requiresClass(Type type, ModuleDecl &mod);

  /// Determine the superclass bound on the given dependent type.
  Type getSuperclassBound(Type type, ModuleDecl &mod);

  using ConformsToArray = SmallVector<ProtocolDecl *, 2>;
  /// Determine the set of protocols to which the given dependent type
  /// must conform.
  ConformsToArray getConformsTo(Type type, ModuleDecl &mod);

  /// Determine whether the given dependent type is equal to a concrete type.
  bool isConcreteType(Type type, ModuleDecl &mod);

  /// Return the concrete type that the given dependent type is constrained to,
  /// or the null Type if it is not the subject of a concrete same-type
  /// constraint.
  Type getConcreteType(Type type, ModuleDecl &mod);

  /// Return the preferred representative of the given type parameter within
  /// this generic signature.  This may yield a concrete type or a
  /// different type parameter.
  Type getRepresentative(Type type, ModuleDecl &mod);

  /// Return whether two type parameters represent the same type under this
  /// generic signature.
  ///
  /// The type parameters must be known to not be concrete within the context.
  bool areSameTypeParameterInContext(Type type1, Type type2, ModuleDecl &mod);

  /// Return the canonical version of the given type under this generic
  /// signature.
  CanType getCanonicalTypeInContext(Type type, ModuleDecl &mod);
  bool isCanonicalTypeInContext(Type type, ModuleDecl &mod);

  static void Profile(llvm::FoldingSetNodeID &ID,
                      ArrayRef<GenericTypeParamType *> genericParams,
                      ArrayRef<Requirement> requirements);

  void print(raw_ostream &OS) const;
  void dump() const;
  std::string getAsString() const;
};

inline
CanGenericSignature::CanGenericSignature(GenericSignature *Signature)
  : Signature(Signature)
{
  assert(!Signature || Signature->isCanonical());
}

inline ArrayRef<CanTypeWrapper<GenericTypeParamType>>
CanGenericSignature::getGenericParams() const{
  ArrayRef<GenericTypeParamType*> params = Signature->getGenericParams();
  auto base = reinterpret_cast<const CanTypeWrapper<GenericTypeParamType>*>(
                                                                params.data());
  return {base, params.size()};
}

} // end namespace swift

#endif // SWIFT_AST_GENERIC_SIGNATURE_H


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<TITLE
>ALTER TABLE</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.6.2 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="SQL Commands"
HREF="sql-commands.html"><LINK
REL="PREVIOUS"
TITLE="ALTER SYSTEM"
HREF="sql-altersystem.html"><LINK
REL="NEXT"
TITLE="ALTER TABLESPACE"
HREF="sql-altertablespace.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2017-02-06T21:56:32">

PostgreSQL 9.6.2 Documentation

Prev	Up		Next

ALTER TABLE

Name
ALTER TABLE -- change the definition of a table

Synopsis

ALTER TABLE [ IF EXISTS ] [ ONLY ] <TT
CLASS="REPLACEABLE"
>name</TT
> [ * ]
    <TT
CLASS="REPLACEABLE"
>action</TT
> [, ... ]
ALTER TABLE [ IF EXISTS ] [ ONLY ] <TT
CLASS="REPLACEABLE"
>name</TT
> [ * ]
    RENAME [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> TO <TT
CLASS="REPLACEABLE"
>new_column_name</TT
>
ALTER TABLE [ IF EXISTS ] [ ONLY ] <TT
CLASS="REPLACEABLE"
>name</TT
> [ * ]
    RENAME CONSTRAINT <TT
CLASS="REPLACEABLE"
>constraint_name</TT
> TO <TT
CLASS="REPLACEABLE"
>new_constraint_name</TT
>
ALTER TABLE [ IF EXISTS ] <TT
CLASS="REPLACEABLE"
>name</TT
>
    RENAME TO <TT
CLASS="REPLACEABLE"
>new_name</TT
>
ALTER TABLE [ IF EXISTS ] <TT
CLASS="REPLACEABLE"
>name</TT
>
    SET SCHEMA <TT
CLASS="REPLACEABLE"
>new_schema</TT
>
ALTER TABLE ALL IN TABLESPACE <TT
CLASS="REPLACEABLE"
>name</TT
> [ OWNED BY <TT
CLASS="REPLACEABLE"
>role_name</TT
> [, ... ] ]
    SET TABLESPACE <TT
CLASS="REPLACEABLE"
>new_tablespace</TT
> [ NOWAIT ]

where <TT
CLASS="REPLACEABLE"
>action</TT
> is one of:

    ADD [ COLUMN ] [ IF NOT EXISTS ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> <TT
CLASS="REPLACEABLE"
>data_type</TT
> [ COLLATE <TT
CLASS="REPLACEABLE"
>collation</TT
> ] [ <TT
CLASS="REPLACEABLE"
>column_constraint</TT
> [ ... ] ]
    DROP [ COLUMN ] [ IF EXISTS ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> [ RESTRICT | CASCADE ]
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> [ SET DATA ] TYPE <TT
CLASS="REPLACEABLE"
>data_type</TT
> [ COLLATE <TT
CLASS="REPLACEABLE"
>collation</TT
> ] [ USING <TT
CLASS="REPLACEABLE"
>expression</TT
> ]
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> SET DEFAULT <TT
CLASS="REPLACEABLE"
>expression</TT
>
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> DROP DEFAULT
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> { SET | DROP } NOT NULL
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> SET STATISTICS <TT
CLASS="REPLACEABLE"
>integer</TT
>
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> SET ( <TT
CLASS="REPLACEABLE"
>attribute_option</TT
> = <TT
CLASS="REPLACEABLE"
>value</TT
> [, ... ] )
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> RESET ( <TT
CLASS="REPLACEABLE"
>attribute_option</TT
> [, ... ] )
    ALTER [ COLUMN ] <TT
CLASS="REPLACEABLE"
>column_name</TT
> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
    ADD <TT
CLASS="REPLACEABLE"
>table_constraint</TT
> [ NOT VALID ]
    ADD <TT
CLASS="REPLACEABLE"
>table_constraint_using_index</TT
>
    ALTER CONSTRAINT <TT
CLASS="REPLACEABLE"
>constraint_name</TT
> [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
    VALIDATE CONSTRAINT <TT
CLASS="REPLACEABLE"
>constraint_name</TT
>
    DROP CONSTRAINT [ IF EXISTS ]  <TT
CLASS="REPLACEABLE"
>constraint_name</TT
> [ RESTRICT | CASCADE ]
    DISABLE TRIGGER [ <TT
CLASS="REPLACEABLE"
>trigger_name</TT
> | ALL | USER ]
    ENABLE TRIGGER [ <TT
CLASS="REPLACEABLE"
>trigger_name</TT
> | ALL | USER ]
    ENABLE REPLICA TRIGGER <TT
CLASS="REPLACEABLE"
>trigger_name</TT
>
    ENABLE ALWAYS TRIGGER <TT
CLASS="REPLACEABLE"
>trigger_name</TT
>
    DISABLE RULE <TT
CLASS="REPLACEABLE"
>rewrite_rule_name</TT
>
    ENABLE RULE <TT
CLASS="REPLACEABLE"
>rewrite_rule_name</TT
>
    ENABLE REPLICA RULE <TT
CLASS="REPLACEABLE"
>rewrite_rule_name</TT
>
    ENABLE ALWAYS RULE <TT
CLASS="REPLACEABLE"
>rewrite_rule_name</TT
>
    DISABLE ROW LEVEL SECURITY
    ENABLE ROW LEVEL SECURITY
    FORCE ROW LEVEL SECURITY
    NO FORCE ROW LEVEL SECURITY
    CLUSTER ON <TT
CLASS="REPLACEABLE"
>index_name</TT
>
    SET WITHOUT CLUSTER
    SET WITH OIDS
    SET WITHOUT OIDS
    SET TABLESPACE <TT
CLASS="REPLACEABLE"
>new_tablespace</TT
>
    SET { LOGGED | UNLOGGED }
    SET ( <TT
CLASS="REPLACEABLE"
>storage_parameter</TT
> = <TT
CLASS="REPLACEABLE"
>value</TT
> [, ... ] )
    RESET ( <TT
CLASS="REPLACEABLE"
>storage_parameter</TT
> [, ... ] )
    INHERIT <TT
CLASS="REPLACEABLE"
>parent_table</TT
>
    NO INHERIT <TT
CLASS="REPLACEABLE"
>parent_table</TT
>
    OF <TT
CLASS="REPLACEABLE"
>type_name</TT
>
    NOT OF
    OWNER TO { <TT
CLASS="REPLACEABLE"
>new_owner</TT
> | CURRENT_USER | SESSION_USER }
    REPLICA IDENTITY { DEFAULT | USING INDEX <TT
CLASS="REPLACEABLE"
>index_name</TT
> | FULL | NOTHING }

and <TT
CLASS="REPLACEABLE"
>table_constraint_using_index</TT
> is:

    [ CONSTRAINT <TT
CLASS="REPLACEABLE"
>constraint_name</TT
> ]
    { UNIQUE | PRIMARY KEY } USING INDEX <TT
CLASS="REPLACEABLE"
>index_name</TT
>
    [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]

Description

   <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> changes the definition of an existing table.
   There are several subforms described below. Note that the lock level required
   may differ for each subform. An <TT
CLASS="LITERAL"
>ACCESS EXCLUSIVE</TT
> lock is held
   unless explicitly noted. When multiple subcommands are listed, the lock
   held will be the strictest one required from any subcommand.

<TT
CLASS="LITERAL"
>ADD COLUMN [ IF NOT EXISTS ]</TT
>

      This form adds a new column to the table, using the same syntax as
      CREATE TABLE. If <TT
CLASS="LITERAL"
>IF NOT EXISTS</TT
>
      is specified and a column already exists with this name,
      no error is thrown.

<TT
CLASS="LITERAL"
>DROP COLUMN [ IF EXISTS ]</TT
>

      This form drops a column from a table.  Indexes and
      table constraints involving the column will be automatically
      dropped as well.  You will need to say <TT
CLASS="LITERAL"
>CASCADE</TT
> if
      anything outside the table depends on the column, for example,
      foreign key references or views.
      If <TT
CLASS="LITERAL"
>IF EXISTS</TT
> is specified and the column
      does not exist, no error is thrown. In this case a notice
      is issued instead.

<TT
CLASS="LITERAL"
>SET DATA TYPE</TT
>

      This form changes the type of a column of a table. Indexes and
      simple table constraints involving the column will be automatically
      converted to use the new column type by reparsing the originally
      supplied expression.
      The optional <TT
CLASS="LITERAL"
>COLLATE</TT
> clause specifies a collation
      for the new column; if omitted, the collation is the default for the
      new column type.
      The optional <TT
CLASS="LITERAL"
>USING</TT
>
      clause specifies how to compute the new column value from the old;
      if omitted, the default conversion is the same as an assignment
      cast from old data type to new.  A  <TT
CLASS="LITERAL"
>USING</TT
>
      clause must be provided if there is no implicit or assignment
      cast from old to new type.

<TT
CLASS="LITERAL"
>SET</TT
>/<TT
CLASS="LITERAL"
>DROP DEFAULT</TT
>

      These forms set or remove the default value for a column.
      Default values only apply in subsequent <TT
CLASS="COMMAND"
>INSERT</TT
>
      or <TT
CLASS="COMMAND"
>UPDATE</TT
> commands; they do not cause rows already in the
      table to change.

<TT
CLASS="LITERAL"
>SET</TT
>/<TT
CLASS="LITERAL"
>DROP NOT NULL</TT
>

      These forms change whether a column is marked to allow null
      values or to reject null values.  You can only use <TT
CLASS="LITERAL"
>SET
      NOT NULL</TT
> when the column contains no null values.

<TT
CLASS="LITERAL"
>SET STATISTICS</TT
>

      This form
      sets the per-column statistics-gathering target for subsequent
      ANALYZE operations.
      The target can be set in the range 0 to 10000; alternatively, set it
      to -1 to revert to using the system default statistics
      target (default_statistics_target).
      For more information on the use of statistics by the
      PostgreSQL query planner, refer to
      Section 14.2.

      <TT
CLASS="LITERAL"
>SET STATISTICS</TT
> acquires a
      <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock.

<TT
CLASS="LITERAL"
>SET ( <TT
CLASS="REPLACEABLE"
>attribute_option</TT
> = <TT
CLASS="REPLACEABLE"
>value</TT
> [, ... ] )</TT
>
<TT
CLASS="LITERAL"
>RESET ( <TT
CLASS="REPLACEABLE"
>attribute_option</TT
> [, ... ] )</TT
>

      This form sets or resets per-attribute options.  Currently, the only
      defined per-attribute options are <TT
CLASS="LITERAL"
>n_distinct</TT
> and
      <TT
CLASS="LITERAL"
>n_distinct_inherited</TT
>, which override the
      number-of-distinct-values estimates made by subsequent
      ANALYZE
      operations.  <TT
CLASS="LITERAL"
>n_distinct</TT
> affects the statistics for the table
      itself, while <TT
CLASS="LITERAL"
>n_distinct_inherited</TT
> affects the statistics
      gathered for the table plus its inheritance children.  When set to a
      positive value, <TT
CLASS="COMMAND"
>ANALYZE</TT
> will assume that the column contains
      exactly the specified number of distinct nonnull values.  When set to a
      negative value, which must be greater
      than or equal to -1, <TT
CLASS="COMMAND"
>ANALYZE</TT
> will assume that the number of
      distinct nonnull values in the column is linear in the size of the
      table; the exact count is to be computed by multiplying the estimated
      table size by the absolute value of the given number.  For example,
      a value of -1 implies that all values in the column are distinct, while
      a value of -0.5 implies that each value appears twice on the average.
      This can be useful when the size of the table changes over time, since
      the multiplication by the number of rows in the table is not performed
      until query planning time.  Specify a value of 0 to revert to estimating
      the number of distinct values normally.  For more information on the use
      of statistics by the PostgreSQL query
      planner, refer to Section 14.2.

      Changing per-attribute options acquires a
      <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock.

<TT
CLASS="LITERAL"
>SET STORAGE</TT
>

      This form sets the storage mode for a column. This controls whether this
      column is held inline or in a secondary <ACRONYM
CLASS="ACRONYM"
>TOAST</ACRONYM
> table, and
      whether the data
      should be compressed or not. <TT
CLASS="LITERAL"
>PLAIN</TT
> must be used
      for fixed-length values such as <TT
CLASS="TYPE"
>integer</TT
> and is
      inline, uncompressed. <TT
CLASS="LITERAL"
>MAIN</TT
> is for inline,
      compressible data. <TT
CLASS="LITERAL"
>EXTERNAL</TT
> is for external,
      uncompressed data, and <TT
CLASS="LITERAL"
>EXTENDED</TT
> is for external,
      compressed data.  <TT
CLASS="LITERAL"
>EXTENDED</TT
> is the default for most
      data types that support non-<TT
CLASS="LITERAL"
>PLAIN</TT
> storage.
      Use of <TT
CLASS="LITERAL"
>EXTERNAL</TT
> will make substring operations on
      very large <TT
CLASS="TYPE"
>text</TT
> and <TT
CLASS="TYPE"
>bytea</TT
> values run faster,
      at the penalty of increased storage space.  Note that
      <TT
CLASS="LITERAL"
>SET STORAGE</TT
> doesn't itself change anything in the table,
      it just sets the strategy to be pursued during future table updates.
      See Section 65.2 for more information.

<TT
CLASS="LITERAL"
>ADD <TT
CLASS="REPLACEABLE"
>table_constraint</TT
> [ NOT VALID ]</TT
>

      This form adds a new constraint to a table using the same syntax as
      CREATE TABLE, plus the option <TT
CLASS="LITERAL"
>NOT
      VALID</TT
>, which is currently only allowed for foreign key
      and CHECK constraints.
      If the constraint is marked <TT
CLASS="LITERAL"
>NOT VALID</TT
>, the
      potentially-lengthy initial check to verify that all rows in the table
      satisfy the constraint is skipped.  The constraint will still be
      enforced against subsequent inserts or updates (that is, they'll fail
      unless there is a matching row in the referenced table, in the case
      of foreign keys; and they'll fail unless the new row matches the
      specified check constraints).  But the
      database will not assume that the constraint holds for all rows in
      the table, until it is validated by using the <TT
CLASS="LITERAL"
>VALIDATE
      CONSTRAINT</TT
> option.

<TT
CLASS="LITERAL"
>ADD <TT
CLASS="REPLACEABLE"
>table_constraint_using_index</TT
></TT
>

      This form adds a new <TT
CLASS="LITERAL"
>PRIMARY KEY</TT
> or <TT
CLASS="LITERAL"
>UNIQUE</TT
>
      constraint to a table based on an existing unique index.  All the
      columns of the index will be included in the constraint.

      The index cannot have expression columns nor be a partial index.
      Also, it must be a b-tree index with default sort ordering.  These
      restrictions ensure that the index is equivalent to one that would be
      built by a regular <TT
CLASS="LITERAL"
>ADD PRIMARY KEY</TT
> or <TT
CLASS="LITERAL"
>ADD UNIQUE</TT
>
      command.

      If <TT
CLASS="LITERAL"
>PRIMARY KEY</TT
> is specified, and the index's columns are not
      already marked <TT
CLASS="LITERAL"
>NOT NULL</TT
>, then this command will attempt to
      do <TT
CLASS="LITERAL"
>ALTER COLUMN SET NOT NULL</TT
> against each such column.
      That requires a full table scan to verify the column(s) contain no
      nulls.  In all other cases, this is a fast operation.

      If a constraint name is provided then the index will be renamed to match
      the constraint name.  Otherwise the constraint will be named the same as
      the index.

      After this command is executed, the index is "owned" by the
      constraint, in the same way as if the index had been built by
      a regular <TT
CLASS="LITERAL"
>ADD PRIMARY KEY</TT
> or <TT
CLASS="LITERAL"
>ADD UNIQUE</TT
>
      command.  In particular, dropping the constraint will make the index
      disappear too.

Note:        Adding a constraint using an existing index can be helpful in
       situations where a new constraint needs to be added without blocking
       table updates for a long time.  To do that, create the index using
       <TT
CLASS="COMMAND"
>CREATE INDEX CONCURRENTLY</TT
>, and then install it as an
       official constraint using this syntax.  See the example below.

<TT
CLASS="LITERAL"
>ALTER CONSTRAINT</TT
>

      This form alters the attributes of a constraint that was previously
      created. Currently only foreign key constraints may be altered.

<TT
CLASS="LITERAL"
>VALIDATE CONSTRAINT</TT
>

      This form validates a foreign key or check constraint that was previously created
      as <TT
CLASS="LITERAL"
>NOT VALID</TT
>, by scanning the table to ensure there
      are no rows for which the constraint is not satisfied.
      Nothing happens if the constraint is already marked valid.

      Validation can be a long process on larger tables. The value of separating
      validation from initial creation is that you can defer validation to less
      busy times, or can be used to give additional time to correct pre-existing
      errors while preventing new errors. Note also that validation on its own
      does not prevent normal write commands against the table while it runs.

      Validation acquires only a <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock
      on the table being altered. If the constraint is a foreign key then
      a <TT
CLASS="LITERAL"
>ROW SHARE</TT
> lock is also required on
      the table referenced by the constraint.

<TT
CLASS="LITERAL"
>DROP CONSTRAINT [ IF EXISTS ]</TT
>

      This form drops the specified constraint on a table.
      If <TT
CLASS="LITERAL"
>IF EXISTS</TT
> is specified and the constraint
      does not exist, no error is thrown. In this case a notice is issued instead.

<TT
CLASS="LITERAL"
>DISABLE</TT
>/<TT
CLASS="LITERAL"
>ENABLE [ REPLICA | ALWAYS ] TRIGGER</TT
>

      These forms configure the firing of trigger(s) belonging to the table.
      A disabled trigger is still known to the system, but is not executed
      when its triggering event occurs.  For a deferred trigger, the enable
      status is checked when the event occurs, not when the trigger function
      is actually executed.  One can disable or enable a single
      trigger specified by name, or all triggers on the table, or only
      user triggers (this option excludes internally generated constraint
      triggers such as those that are used to implement foreign key
      constraints or deferrable uniqueness and exclusion constraints).
      Disabling or enabling internally generated constraint triggers
      requires superuser privileges; it should be done with caution since
      of course the integrity of the constraint cannot be guaranteed if the
      triggers are not executed.
      The trigger firing mechanism is also affected by the configuration
      variable session_replication_role. Simply enabled
      triggers will fire when the replication role is "origin"
      (the default) or "local". Triggers configured as <TT
CLASS="LITERAL"
>ENABLE
      REPLICA</TT
> will only fire if the session is in "replica"
      mode, and triggers configured as <TT
CLASS="LITERAL"
>ENABLE ALWAYS</TT
> will
      fire regardless of the current replication mode.

      This command acquires a <TT
CLASS="LITERAL"
>SHARE ROW EXCLUSIVE</TT
> lock.

<TT
CLASS="LITERAL"
>DISABLE</TT
>/<TT
CLASS="LITERAL"
>ENABLE [ REPLICA | ALWAYS ] RULE</TT
>

      These forms configure the firing of rewrite rules belonging to the table.
      A disabled rule is still known to the system, but is not applied
      during query rewriting. The semantics are as for disabled/enabled
      triggers. This configuration is ignored for <TT
CLASS="LITERAL"
>ON SELECT</TT
> rules, which
      are always applied in order to keep views working even if the current
      session is in a non-default replication role.

<TT
CLASS="LITERAL"
>DISABLE</TT
>/<TT
CLASS="LITERAL"
>ENABLE ROW LEVEL SECURITY</TT
>

      These forms control the application of row security policies belonging
      to the table.  If enabled and no policies exist for the table, then a
      default-deny policy is applied.  Note that policies can exist for a table
      even if row level security is disabled - in this case, the policies will
      NOT be applied and the policies will be ignored.
      See also
      CREATE POLICY.

<TT
CLASS="LITERAL"
>NO FORCE</TT
>/<TT
CLASS="LITERAL"
>FORCE ROW LEVEL SECURITY</TT
>

      These forms control the application of row security policies belonging
      to the table when the user is the table owner.  If enabled, row level
      security policies will be applied when the user is the table owner.  If
      disabled (the default) then row level security will not be applied when
      the user is the table owner.
      See also
      CREATE POLICY.

<TT
CLASS="LITERAL"
>CLUSTER ON</TT
>

      This form selects the default index for future
      CLUSTER
      operations.  It does not actually re-cluster the table.

      Changing cluster options acquires a <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock.

<TT
CLASS="LITERAL"
>SET WITHOUT CLUSTER</TT
>

      This form removes the most recently used
      CLUSTER
      index specification from the table.  This affects
      future cluster operations that don't specify an index.

      Changing cluster options acquires a <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock.

<TT
CLASS="LITERAL"
>SET WITH OIDS</TT
>

      This form adds an <TT
CLASS="LITERAL"
>oid</TT
> system column to the
      table (see Section 5.4).
      It does nothing if the table already has OIDs.

      Note that this is not equivalent to <TT
CLASS="LITERAL"
>ADD COLUMN oid oid</TT
>;
      that would add a normal column that happened to be named
      <TT
CLASS="LITERAL"
>oid</TT
>, not a system column.

<TT
CLASS="LITERAL"
>SET WITHOUT OIDS</TT
>

      This form removes the <TT
CLASS="LITERAL"
>oid</TT
> system column from the
      table.  This is exactly equivalent to
      <TT
CLASS="LITERAL"
>DROP COLUMN oid RESTRICT</TT
>,
      except that it will not complain if there is already no
      <TT
CLASS="LITERAL"
>oid</TT
> column.

<TT
CLASS="LITERAL"
>SET TABLESPACE</TT
>

      This form changes the table's tablespace to the specified tablespace and
      moves the data file(s) associated with the table to the new tablespace.
      Indexes on the table, if any, are not moved; but they can be moved
      separately with additional <TT
CLASS="LITERAL"
>SET TABLESPACE</TT
> commands.
      All tables in the current database in a tablespace can be moved by using
      the <TT
CLASS="LITERAL"
>ALL IN TABLESPACE</TT
> form, which will lock all tables
      to be moved first and then move each one.  This form also supports
      <TT
CLASS="LITERAL"
>OWNED BY</TT
>, which will only move tables owned by the
      roles specified.  If the <TT
CLASS="LITERAL"
>NOWAIT</TT
> option is specified
      then the command will fail if it is unable to acquire all of the locks
      required immediately.  Note that system catalogs are not moved by this
      command, use <TT
CLASS="COMMAND"
>ALTER DATABASE</TT
> or explicit
      <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> invocations instead if desired.  The
      <TT
CLASS="LITERAL"
>information_schema</TT
> relations are not considered part
      of the system catalogs and will be moved.
      See also
      CREATE TABLESPACE.

<TT
CLASS="LITERAL"
>SET { LOGGED | UNLOGGED }</TT
>

      This form changes the table from unlogged to logged or vice-versa
      (see <TT
CLASS="LITERAL"
>UNLOGGED</TT
>).  It cannot be applied
      to a temporary table.

<TT
CLASS="LITERAL"
>SET ( <TT
CLASS="REPLACEABLE"
>storage_parameter</TT
> = <TT
CLASS="REPLACEABLE"
>value</TT
> [, ... ] )</TT
>

      This form changes one or more storage parameters for the table.  See
      Storage Parameters
      for details on the available parameters.  Note that the table contents
      will not be modified immediately by this command; depending on the
      parameter you might need to rewrite the table to get the desired effects.
      That can be done with VACUUM
      FULL, CLUSTER or one of the forms
      of <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> that forces a table rewrite.

      Changing fillfactor and autovacuum storage parameters acquires a <TT
CLASS="LITERAL"
>SHARE UPDATE EXCLUSIVE</TT
> lock.

Note:        While <TT
CLASS="COMMAND"
>CREATE TABLE</TT
> allows <TT
CLASS="LITERAL"
>OIDS</TT
> to be specified
       in the <TT
CLASS="LITERAL"
>WITH (<TT
CLASS="REPLACEABLE"
>storage_parameter</TT
>)</TT
> syntax,
       <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> does not treat <TT
CLASS="LITERAL"
>OIDS</TT
> as a
       storage parameter.  Instead use the <TT
CLASS="LITERAL"
>SET WITH OIDS</TT
>
       and <TT
CLASS="LITERAL"
>SET WITHOUT OIDS</TT
> forms to change OID status.

<TT
CLASS="LITERAL"
>RESET ( <TT
CLASS="REPLACEABLE"
>storage_parameter</TT
> [, ... ] )</TT
>

      This form resets one or more storage parameters to their
      defaults.  As with <TT
CLASS="LITERAL"
>SET</TT
>, a table rewrite might be
      needed to update the table entirely.

<TT
CLASS="LITERAL"
>INHERIT <TT
CLASS="REPLACEABLE"
>parent_table</TT
></TT
>

      This form adds the target table as a new child of the specified parent
      table.  Subsequently, queries against the parent will include records
      of the target table.  To be added as a child, the target table must
      already contain all the same columns as the parent (it could have
      additional columns, too).  The columns must have matching data types,
      and if they have <TT
CLASS="LITERAL"
>NOT NULL</TT
> constraints in the parent
      then they must also have <TT
CLASS="LITERAL"
>NOT NULL</TT
> constraints in the
      child.

      There must also be matching child-table constraints for all
      <TT
CLASS="LITERAL"
>CHECK</TT
> constraints of the parent, except those
      marked non-inheritable (that is, created with <TT
CLASS="LITERAL"
>ALTER TABLE ... ADD CONSTRAINT ... NO INHERIT</TT
>)
      in the parent, which are ignored; all child-table constraints matched
      must not be marked non-inheritable.
      Currently
      <TT
CLASS="LITERAL"
>UNIQUE</TT
>, <TT
CLASS="LITERAL"
>PRIMARY KEY</TT
>, and
      <TT
CLASS="LITERAL"
>FOREIGN KEY</TT
> constraints are not considered, but
      this might change in the future.

<TT
CLASS="LITERAL"
>NO INHERIT <TT
CLASS="REPLACEABLE"
>parent_table</TT
></TT
>

      This form removes the target table from the list of children of the
      specified parent table.
      Queries against the parent table will no longer include records drawn
      from the target table.

<TT
CLASS="LITERAL"
>OF <TT
CLASS="REPLACEABLE"
>type_name</TT
></TT
>

      This form links the table to a composite type as though <TT
CLASS="COMMAND"
>CREATE
      TABLE OF</TT
> had formed it.  The table's list of column names and types
      must precisely match that of the composite type; the presence of
      an <TT
CLASS="LITERAL"
>oid</TT
> system column is permitted to differ.  The table must
      not inherit from any other table.  These restrictions ensure
      that <TT
CLASS="COMMAND"
>CREATE TABLE OF</TT
> would permit an equivalent table
      definition.

<TT
CLASS="LITERAL"
>NOT OF</TT
>

      This form dissociates a typed table from its type.

<TT
CLASS="LITERAL"
>OWNER</TT
>

      This form changes the owner of the table, sequence, view, materialized view,
      or foreign table to the specified user.

<TT
CLASS="LITERAL"
>REPLICA IDENTITY</TT
>

      This form changes the information which is written to the write-ahead log
      to identify rows which are updated or deleted.  This option has no effect
      except when logical replication is in use.  <TT
CLASS="LITERAL"
>DEFAULT</TT
>
      (the default for non-system tables) records the
      old values of the columns of the primary key, if any.  <TT
CLASS="LITERAL"
>USING INDEX</TT
>
      records the old values of the columns covered by the named index, which
      must be unique, not partial, not deferrable, and include only columns marked
      <TT
CLASS="LITERAL"
>NOT NULL</TT
>.  <TT
CLASS="LITERAL"
>FULL</TT
> records the old values of all columns
      in the row.  <TT
CLASS="LITERAL"
>NOTHING</TT
> records no information about the old row.
      (This is the default for system tables.)
      In all cases, no old values are logged unless at least one of the columns
      that would be logged differs between the old and new versions of the row.

<TT
CLASS="LITERAL"
>RENAME</TT
>

      The <TT
CLASS="LITERAL"
>RENAME</TT
> forms change the name of a table
      (or an index, sequence, view, materialized view, or foreign table), the name
      of an individual column in a table, or the name of a constraint of the table.
      There is no effect on the stored data.

<TT
CLASS="LITERAL"
>SET SCHEMA</TT
>

      This form moves the table into another schema.  Associated indexes,
      constraints, and sequences owned by table columns are moved as well.

   All the forms of ALTER TABLE that act on a single table, except
   <TT
CLASS="LITERAL"
>RENAME</TT
>, and <TT
CLASS="LITERAL"
>SET SCHEMA</TT
>
   can be combined into a list of multiple alterations to applied together.
   For example, it
   is possible to add several columns and/or alter the type of several
   columns in a single command.  This is particularly useful with large
   tables, since only one pass over the table need be made.

   You must own the table to use <TT
CLASS="COMMAND"
>ALTER TABLE</TT
>.
   To change the schema or tablespace of a table, you must also have
   <TT
CLASS="LITERAL"
>CREATE</TT
> privilege on the new schema or tablespace.
   To add the table as a new child of a parent table, you must own the
   parent table as well.
   To alter the owner, you must also be a direct or indirect member of the new
   owning role, and that role must have <TT
CLASS="LITERAL"
>CREATE</TT
> privilege on
   the table's schema.  (These restrictions enforce that altering the owner
   doesn't do anything you couldn't do by dropping and recreating the table.
   However, a superuser can alter ownership of any table anyway.)
   To add a column or alter a column type or use the <TT
CLASS="LITERAL"
>OF</TT
>
   clause, you must also have <TT
CLASS="LITERAL"
>USAGE</TT
> privilege on the data
   type.

Parameters

<TT
CLASS="LITERAL"
>IF EXISTS</TT
>

        Do not throw an error if the table does not exist. A notice is issued
        in this case.

<TT
CLASS="REPLACEABLE"
>name</TT
>

        The name (optionally schema-qualified) of an existing table to
        alter. If <TT
CLASS="LITERAL"
>ONLY</TT
> is specified before the table name, only
        that table is altered. If <TT
CLASS="LITERAL"
>ONLY</TT
> is not specified, the table
        and all its descendant tables (if any) are altered.  Optionally,
        <TT
CLASS="LITERAL"
>*</TT
> can be specified after the table name to explicitly
        indicate that descendant tables are included.

<TT
CLASS="REPLACEABLE"
>column_name</TT
>

        Name of a new or existing column.

<TT
CLASS="REPLACEABLE"
>new_column_name</TT
>

        New name for an existing column.

<TT
CLASS="REPLACEABLE"
>new_name</TT
>

        New name for the table.

<TT
CLASS="REPLACEABLE"
>data_type</TT
>

        Data type of the new column, or new data type for an existing
        column.

<TT
CLASS="REPLACEABLE"
>table_constraint</TT
>

        New table constraint for the table.

<TT
CLASS="REPLACEABLE"
>constraint_name</TT
>

        Name of a new or existing constraint.

<TT
CLASS="LITERAL"
>CASCADE</TT
>

        Automatically drop objects that depend on the dropped column
        or constraint (for example, views referencing the column),
        and in turn all objects that depend on those objects
        (see Section 5.13).

<TT
CLASS="LITERAL"
>RESTRICT</TT
>

        Refuse to drop the column or constraint if there are any dependent
        objects. This is the default behavior.

<TT
CLASS="REPLACEABLE"
>trigger_name</TT
>

        Name of a single trigger to disable or enable.

<TT
CLASS="LITERAL"
>ALL</TT
>

        Disable or enable all triggers belonging to the table.
        (This requires superuser privilege if any of the triggers are
        internally generated constraint triggers such as those that are used
        to implement foreign key constraints or deferrable uniqueness and
        exclusion constraints.)

<TT
CLASS="LITERAL"
>USER</TT
>

        Disable or enable all triggers belonging to the table except for
        internally generated constraint triggers such as those that are used
        to implement foreign key constraints or deferrable uniqueness and
        exclusion constraints.

<TT
CLASS="REPLACEABLE"
>index_name</TT
>

        The name of an existing index.

<TT
CLASS="REPLACEABLE"
>storage_parameter</TT
>

        The name of a table storage parameter.

<TT
CLASS="REPLACEABLE"
>value</TT
>

        The new value for a table storage parameter.
        This might be a number or a word depending on the parameter.

<TT
CLASS="REPLACEABLE"
>parent_table</TT
>

        A parent table to associate or de-associate with this table.

<TT
CLASS="REPLACEABLE"
>new_owner</TT
>

        The user name of the new owner of the table.

<TT
CLASS="REPLACEABLE"
>new_tablespace</TT
>

        The name of the tablespace to which the table will be moved.

<TT
CLASS="REPLACEABLE"
>new_schema</TT
>

        The name of the schema to which the table will be moved.

Notes

    The key word <TT
CLASS="LITERAL"
>COLUMN</TT
> is noise and can be omitted.

    When a column is added with <TT
CLASS="LITERAL"
>ADD COLUMN</TT
>, all existing
    rows in the table are initialized with the column's default value
    (NULL if no <TT
CLASS="LITERAL"
>DEFAULT</TT
> clause is specified).
    If there is no <TT
CLASS="LITERAL"
>DEFAULT</TT
> clause, this is merely a metadata
    change and does not require any immediate update of the table's data;
    the added NULL values are supplied on readout, instead.

    Adding a column with a <TT
CLASS="LITERAL"
>DEFAULT</TT
> clause or changing the type of
    an existing column will require the entire table and its indexes to be
    rewritten.  As an exception when changing the type of an existing column,
    if the <TT
CLASS="LITERAL"
>USING</TT
> clause does not change the column
    contents and the old type is either binary coercible to the new type or
    an unconstrained domain over the new type, a table rewrite is not needed;
    but any indexes on the affected columns must still be rebuilt.  Adding or
    removing a system <TT
CLASS="LITERAL"
>oid</TT
> column also requires rewriting the entire
    table.  Table and/or index rebuilds may take a significant amount of time
    for a large table; and will temporarily require as much as double the disk
    space.

    Adding a <TT
CLASS="LITERAL"
>CHECK</TT
> or <TT
CLASS="LITERAL"
>NOT NULL</TT
> constraint requires
    scanning the table to verify that existing rows meet the constraint,
    but does not require a table rewrite.

    The main reason for providing the option to specify multiple changes
    in a single <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> is that multiple table scans or
    rewrites can thereby be combined into a single pass over the table.

    The <TT
CLASS="LITERAL"
>DROP COLUMN</TT
> form does not physically remove
    the column, but simply makes it invisible to SQL operations.  Subsequent
    insert and update operations in the table will store a null value for the
    column. Thus, dropping a column is quick but it will not immediately
    reduce the on-disk size of your table, as the space occupied
    by the dropped column is not reclaimed.  The space will be
    reclaimed over time as existing rows are updated.  (These statements do
    not apply when dropping the system <TT
CLASS="LITERAL"
>oid</TT
> column; that is done
    with an immediate rewrite.)

    To force immediate reclamation of space occupied by a dropped column,
    you can execute one of the forms of <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> that
    performs a rewrite of the whole table.  This results in reconstructing
    each row with the dropped column replaced by a null value.

    The rewriting forms of <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> are not MVCC-safe.
    After a table rewrite, the table will appear empty to concurrent
    transactions, if they are using a snapshot taken before the rewrite
    occurred.  See Section 13.5 for more details.

    The <TT
CLASS="LITERAL"
>USING</TT
> option of <TT
CLASS="LITERAL"
>SET DATA TYPE</TT
> can actually
    specify any expression involving the old values of the row; that is, it
    can refer to other columns as well as the one being converted.  This allows
    very general conversions to be done with the <TT
CLASS="LITERAL"
>SET DATA TYPE</TT
>
    syntax.  Because of this flexibility, the <TT
CLASS="LITERAL"
>USING</TT
>
    expression is not applied to the column's default value (if any); the
    result might not be a constant expression as required for a default.
    This means that when there is no implicit or assignment cast from old to
    new type, <TT
CLASS="LITERAL"
>SET DATA TYPE</TT
> might fail to convert the default even
    though a <TT
CLASS="LITERAL"
>USING</TT
> clause is supplied.  In such cases,
    drop the default with <TT
CLASS="LITERAL"
>DROP DEFAULT</TT
>, perform the <TT
CLASS="LITERAL"
>ALTER
    TYPE</TT
>, and then use <TT
CLASS="LITERAL"
>SET DEFAULT</TT
> to add a suitable new
    default.  Similar considerations apply to indexes and constraints involving
    the column.

    If a table has any descendant tables, it is not permitted to add,
    rename, or change the type of a column, or rename an inherited constraint
    in the parent table without doing
    the same to the descendants.  That is, <TT
CLASS="COMMAND"
>ALTER TABLE ONLY</TT
>
    will be rejected.  This ensures that the descendants always have
    columns matching the parent.

    A recursive <TT
CLASS="LITERAL"
>DROP COLUMN</TT
> operation will remove a
    descendant table's column only if the descendant does not inherit
    that column from any other parents and never had an independent
    definition of the column.  A nonrecursive <TT
CLASS="LITERAL"
>DROP
    COLUMN</TT
> (i.e., <TT
CLASS="COMMAND"
>ALTER TABLE ONLY ... DROP
    COLUMN</TT
>) never removes any descendant columns, but
    instead marks them as independently defined rather than inherited.

    The <TT
CLASS="LITERAL"
>TRIGGER</TT
>, <TT
CLASS="LITERAL"
>CLUSTER</TT
>, <TT
CLASS="LITERAL"
>OWNER</TT
>,
    and <TT
CLASS="LITERAL"
>TABLESPACE</TT
> actions never recurse to descendant tables;
    that is, they always act as though <TT
CLASS="LITERAL"
>ONLY</TT
> were specified.
    Adding a constraint recurses only for <TT
CLASS="LITERAL"
>CHECK</TT
> constraints
    that are not marked <TT
CLASS="LITERAL"
>NO INHERIT</TT
>.

    Changing any part of a system catalog table is not permitted.

    Refer to CREATE TABLE for a further description of valid
    parameters. Chapter 5 has further information on
    inheritance.

Examples

   To add a column of type <TT
CLASS="TYPE"
>varchar</TT
> to a table:

ALTER TABLE distributors ADD COLUMN address varchar(30);

   To drop a column from a table:

ALTER TABLE distributors DROP COLUMN address RESTRICT;

   To change the types of two existing columns in one operation:

ALTER TABLE distributors
    ALTER COLUMN address TYPE varchar(80),
    ALTER COLUMN name TYPE varchar(100);

   To change an integer column containing Unix timestamps to <TT
CLASS="TYPE"
>timestamp
   with time zone</TT
> via a <TT
CLASS="LITERAL"
>USING</TT
> clause:

ALTER TABLE foo
    ALTER COLUMN foo_timestamp SET DATA TYPE timestamp with time zone
    USING
        timestamp with time zone 'epoch' + foo_timestamp * interval '1 second';

   The same, when the column has a default expression that won't automatically
   cast to the new data type:

ALTER TABLE foo
    ALTER COLUMN foo_timestamp DROP DEFAULT,
    ALTER COLUMN foo_timestamp TYPE timestamp with time zone
    USING
        timestamp with time zone 'epoch' + foo_timestamp * interval '1 second',
    ALTER COLUMN foo_timestamp SET DEFAULT now();

   To rename an existing column:

ALTER TABLE distributors RENAME COLUMN address TO city;

   To rename an existing table:

ALTER TABLE distributors RENAME TO suppliers;

   To rename an existing constraint:

ALTER TABLE distributors RENAME CONSTRAINT zipchk TO zip_check;

   To add a not-null constraint to a column:

ALTER TABLE distributors ALTER COLUMN street SET NOT NULL;

   To remove a not-null constraint from a column:

ALTER TABLE distributors ALTER COLUMN street DROP NOT NULL;

   To add a check constraint to a table and all its children:

ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5);

   To add a check constraint only to a table and not to its children:

ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5) NO INHERIT;

   (The check constraint will not be inherited by future children, either.)

   To remove a check constraint from a table and all its children:

ALTER TABLE distributors DROP CONSTRAINT zipchk;

   To remove a check constraint from one table only:

ALTER TABLE ONLY distributors DROP CONSTRAINT zipchk;

   (The check constraint remains in place for any child tables.)

   To add a foreign key constraint to a table:

ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses (address);

   To add a foreign key constraint to a table with the least impact on other work:

ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses (address) NOT VALID;
ALTER TABLE distributors VALIDATE CONSTRAINT distfk;

   To add a (multicolumn) unique constraint to a table:

ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zipcode);

   To add an automatically named primary key constraint to a table, noting
   that a table can only ever have one primary key:

ALTER TABLE distributors ADD PRIMARY KEY (dist_id);

   To move a table to a different tablespace:

ALTER TABLE distributors SET TABLESPACE fasttablespace;

   To move a table to a different schema:

ALTER TABLE myschema.distributors SET SCHEMA yourschema;

   To recreate a primary key constraint, without blocking updates while the
   index is rebuilt:

CREATE UNIQUE INDEX CONCURRENTLY dist_id_temp_idx ON distributors (dist_id);
ALTER TABLE distributors DROP CONSTRAINT distributors_pkey,
    ADD CONSTRAINT distributors_pkey PRIMARY KEY USING INDEX dist_id_temp_idx;

Compatibility

   The forms <TT
CLASS="LITERAL"
>ADD</TT
> (without <TT
CLASS="LITERAL"
>USING INDEX</TT
>),
   <TT
CLASS="LITERAL"
>DROP</TT
>, <TT
CLASS="LITERAL"
>SET DEFAULT</TT
>,
   and <TT
CLASS="LITERAL"
>SET DATA TYPE</TT
> (without <TT
CLASS="LITERAL"
>USING</TT
>)
   conform with the SQL standard.  The other forms are
   PostgreSQL extensions of the SQL standard.
   Also, the ability to specify more than one manipulation in a single
   <TT
CLASS="COMMAND"
>ALTER TABLE</TT
> command is an extension.

   <TT
CLASS="COMMAND"
>ALTER TABLE DROP COLUMN</TT
> can be used to drop the only
   column of a table, leaving a zero-column table.  This is an
   extension of SQL, which disallows zero-column tables.

See Also
CREATE TABLE

Prev	Home	Next

ALTER SYSTEM	Up	ALTER TABLESPACE


text:
package com.google.gerrit.server.events;

public abstract class ChangeEvent {
}


text:
package com.lyncode.reflection.convert;

import com.google.common.base.Optional;
import com.lyncode.reflection.model.Value;

public interface Converter {
    Optional<Value> convert (Object input, Class to);
}


text:
'use strict';

var path = require('path');
var Item = require('../item/item');
var ConverionController = require('../conversion/conversion-controller');
var GimpDetector = require('../gimp/gimp-detector');
var GraphicsMagick = require('../graphicsmagick/graphicsmagick');
var ImageMagick = require('../imagemagick/imagemagick');
var ItemState = require('../item/item-state');

/**
 * @class ConversionProcessor
 * @constructor
 */
var ConversionProcessor = function (task, process, grunt) {
    this._grunt = grunt;
    this._process = process;
    this._gimp = new GimpDetector(this._process, this._grunt).createGimp();
    this._imageMagick = new ImageMagick(this._grunt);
    this._graphicsMagick = new GraphicsMagick(this._grunt);
    this._conversionController = new ConverionController(this._grunt, this._gimp, this._imageMagick, this._graphicsMagick);
    this._processingTaskCount = 0;
    this._maxAsync = 3;
};

/**
 * @param {Array} queue
 * @param {Function} callback
 */
ConversionProcessor.prototype.process = function (queue, callback) {
    this._queue = queue;
    this._callback = callback;
    this.processBatch(this.getBatch());
};

/**
 * @returns {Array}
 */
ConversionProcessor.prototype.getBatch = function () {
    return this._queue.splice(0, this._maxAsync);
};

ConversionProcessor.prototype.processBatch = function (batch) {
    var root = this;
    this._processingTaskCount = batch.length;
    for (var i = 0, len = batch.length; i < len; ++i) {
        this.processConversion(batch[i], function () {
            root.onConversion();
        });
    }
};

ConversionProcessor.prototype.onConversion = function () {
    this._processingTaskCount--;
    if (this._processingTaskCount === 0) {
        if (this._queue.length) {
            this.processBatch(this.getBatch());
        } else {
            if (typeof this._callback !== 'undefined') {
                this._callback();
            }
        }
    }
};

ConversionProcessor.prototype.processConversion = function (conversion, callback) {
    this._conversionController.convert(conversion, function () {
        new ItemState().updateTimestamp(conversion);
        if (typeof callback !== 'undefined') {
            callback();
        }
    });
};

/* global module:false */
module.exports = ConversionProcessor;


text:
[Riemann reporter](https://github.com/smartcat-labs/cassandra-diagnostics/blob/dev/cassandra-diagnostics-reporter-riemann/src/main/java/io/smartcat/cassandra/diagnostics/reporter/RiemannReporter.java) sends measurements as Riemann events towards the configured [Riemann server](http://riemann.io/) using TCP transport. It is using batch Riemann client to save resources and send more events in one network round trip.

Generated Riemann Events looks like the following:

```
host: <originating host name>
service: <measurement name>
state: "ok"
metric: <measurement value>
ttl: 30
tags:
  id: <UUID for this measurement>
  statementType: <type of statement>
fields:
  client: <client doing request>
  statement: <statement which was executed>
```

Riemann reporter has the following configuration parameters (that can be specified using `options`):

- _riemannHost_ - Riemann server's host name (IP address). This parameter is required.
- _riemannPort_ - Riemann server's TCP port number (5555 by default). This parameter is optional.
- _batchEventSize_ - Riemann events that fit in one batch, this is length that triggers sending of events (10 by default). This parameter is optional.

Here is an example configuration that uses Riemann reporter:

```
reporters:
  - reporter: io.smartcat.cassandra.diagnostics.reporter.RiemannReporter
    options:
  	  riemannHost: 127.0.0.1
      riemannPort: 5555 #Optional
      batchEventSize: 50 #Optional

modules:
  - module: io.smartcat.cassandra.diagnostics.module.slowquery.SlowQueryModule
    measurement: slow_query
    options:
      slowQueryThresholdInMilliseconds: 10
    reporters:
      - io.smartcat.cassandra.diagnostics.reporter.RiemannReporter
```


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
    <link href="css/materialize.min.css" media="screen,projection" rel=
    "stylesheet" type="text/css">
    <link href="css/style.css" media="screen,projection" rel="stylesheet" type=
    "text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel=
    "stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Roboto:500' rel=
    'stylesheet' type='text/css'>

    <title></title>

Architecture

Tokyo Skytree

Portraits

for any occasion

Showcases

Display your work for all to see

Professional Photography

Local and Reasonable

Professional Photography

Local and Reasonable

              Return home