blob: 4fda53f55f7e3743dc578bbeae206b0d369011c7 [file] [log] [blame]
// 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}.",
}
DidYouMeanLowercaseK(off int64) {
"en": "[{off}]Did you mean: 'k'?",
}
DidYouMeanLowercaseV(off int64) {
"en": "[{off}]Did you mean: 'v'?",
}
DidYouMeanFunction(off int64, correctName string) {
"en": "[{off}]Did you mean: '{correctName}'?",
}
)