// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package syncql

// SyncQL errors
error (
	BadFieldInWhere(off int64) {
		"en": "[{off}]Where field must be 'k' or 'v[{.<ident>}...]'.",
	}
	BoolInvalidExpression(off int64) {
		"en": "[{off}]Boolean operands may only be used in equals and not equals expressions.",
	}
	CheckOfUnknownStatementType(off int64) {
		"en": "[{off}]Cannot semantically check unknown statement type.",
	}
	CouldNotConvert(off int64, from string, to string) {
		"en": "[{off}]Could not convert {from} to {to}.",
	}
	DotNotationDisallowedForKey(off int64) {
		"en": "[{off}]Dot notation may not be used on a key field.",
	}
	ErrorCompilingRegularExpression(off int64, regex string, err error) {
		"en": "[{off}]The following error encountered compiling regex '{regex}': {err}",
	}
	ExecOfUnknownStatementType(off int64, statementType string) {
		"en": "[{off}]Cannot execute unknown statement type: {statementType}.",
	}
	Expected(off int64, expected string) {
		"en": "[{off}]Expected '{expected}'.",
	}
	ExpectedFrom(off int64, found string) {
		"en": "[{off}]Expected 'from', found {found}.",
	}
	ExpectedIdentifier(off int64, found string) {
		"en": "[{off}]Expected identifier, found {found}.",
	}
	ExpectedOperand(off int64, found string) {
		"en": "[{off}]Expected operand, found {found}.",
	}
	ExpectedOperator(off int64, found string) {
		"en": "[{off}]Expected operator, found {found}.",
	}
	FunctionArgCount(off int64, name string, expected int64, found int64) {
		"en": "[{off}]Function '{name}' expects {expected} args, found: {found}.",
	}
	FunctionTypeInvalidArg(off int64) {
		"en": "[{off}]Function 'Type()' cannot get type of argument -- expecting object.",
	}
	FunctionLenInvalidArg(off int64) {
		"en": "[{off}]Function 'Len()' expects array, list, set, map, string or nil.",
	}
	FunctionArgBad(off int64, funcName, argName string) {
		"en": "[{off}]Function '{funcName}' arg '{argName}' could not be resolved.",
	}
	FunctionNotFound(off int64, name string) {
		"en": "[{off}]Function '{name}' not found.",
	}
	ArgMustBeField(off int64) {
		"en": "[{off}]Argument must be a value field (i.e., must begin with 'v').",
	}
	TimeConversionError(off int64, err error) {
		"en": "[{off}]Can't convert to time: {err}.",
	}
	LocationConversionError(off int64, err error) {
		"en": "[{off}]Can't convert to location: {err}.",
	}
	StringConversionError(off int64, err error) {
		"en": "[{off}]Can't convert to string: {err}.",
	}
	FloatConversionError(off int64, err error) {
		"en": "[{off}]Can't convert to float: {err}.",
	}
	IsIsNotRequireLhsValue(off int64) {
		"en": "[{off}]'Is/is not' expressions require left operand to be a value operand.",
	}
	IsIsNotRequireRhsNil(off int64) {
		"en": "[{off}]'Is/is not' expressions require right operand to be nil.",
	}
	InvalidEscapedChar(off int64) {
		// TODO(jkline): get the actual characters to compile (e.g., '\\').
		"en": "[{off}Expected backslash, percent, or underscore after backslash.]",
	}
	InvalidSelectField(off int64) {
		"en": "[{off}]Select field must be 'k' or 'v[{.<ident>}...]'.",
	}
	KeyExpressionLiteral(off int64) {
		"en": "[{off}]Key (i.e., 'k') compares against literals must be string literal.",
	}
	KeyValueStreamError(off int64, err error) {
		"en": "[{off}]KeyValueStream error: {err}.",
	}
	LikeExpressionsRequireRhsString(off int64) {
		"en": "[{off}]Like expressions require right operand of type <string-literal>.",
	}
	LimitMustBeGe0(off int64) {
		"en": "[{off}]Limit must be > 0.",
	}
	NoStatementFound(off int64) {
		"en": "[{off}]No statement found.",
	}
	OffsetMustBeGe0(off int64) {
		"en": "[{off}]Offset must be > 0.",
	}
	ScanError(off int64, err error) {
		"en": "[{off}]Scan error: {err}.",
	}
	TableCantAccess(off int64, table string, err error) {
		"en": "[{off}]Table {table} does not exist (or cannot be accessed): {err}.",
	}
	Unexpected(off int64, found string) {
		"en": "[{off}]Unexpected: {found}.",
	}
	UnexpectedEndOfStatement(off int64) {
		"en": "[{off}]No statement found.",
	}
	UnknownIdentifier(off int64, found string) {
		"en": "[{off}]Uknown identifier: {found}.",
	}
)
