{ "translations": { "Storage is temporarily not available" : "El almacenamiento no está disponible temporalmente ", "Storage invalid" : "El almacenamiento es inválido", "Unknown error" : "Se presentó un error desconocido", "File could not be found" : "No fue posible encontrar el archivo", "Move or copy" : "Mover o copiar", "Download" : "Descargar", "Delete" : "Borrar", "Home" : "Inicio", "Close" : "Cerrar", "Favorites" : "Favoritos", "Could not create folder \"{dir}\"" : "No fue posible crear la carpeta \"{dir}\"", "Upload cancelled." : "Carga cancelada.", "…" : "...", "Unable to upload {filename} as it is a directory or has 0 bytes" : "No fue posible cargar {filename} ya que es una carpeta o tiene un tamaño de 0 bytes", "Not enough free space, you are uploading {size1} but only {size2} is left" : "No tienes suficiente espacio disponible, Estás cargando {size1} pero sólo cuentas con {size2} disponible", "Target folder \"{dir}\" does not exist any more" : "La carpeta destino \"{dir}\" ya no existe", "Not enough free space" : "No cuentas con suficiente espacio libre", "Uploading …" : "Cargando...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", "Target folder does not exist any more" : "La carpeta destino ya no existe", "Error when assembling chunks, status code {status}" : "Se presentó un error al ensamblar los bloques, código de estatus {status}", "Actions" : "Acciones", "Rename" : "Renombrar", "Copy" : "Copiar", "Delete file" : "Borrar archivo", "Delete folder" : "Borrar carpeta", "Disconnect storage" : "Desconectar almacenamiento", "Could not load info for file \"{file}\"" : "No fue posible cargar información para el archivo \"{file}\"", "Files" : "Archivos", "Details" : "Detalles", "Select" : "Seleccionar", "Pending" : "Pendiente", "Unable to determine date" : "No fue posible determinar la fecha", "This operation is forbidden" : "Esta operación está prohibida", "This directory is unavailable, please check the logs or contact the administrator" : "Esta carpeta no está disponible, por favor verfica las bitácoras o contacta al administrador", "Could not move \"{file}\", target exists" : "No fue posible mover \"{file}\", el destino ya existe", "Could not move \"{file}\"" : "No fue posible mover \"{file}\"", "Could not copy \"{file}\", target exists" : "No se pudo copiar \"{file}\", el destino ya existe", "Could not copy \"{file}\"" : "No se pudo copiar \"{file}\"", "Copied {origin} inside {destination}" : "{origin} fue copiado dentro de {destination}", "Copied {origin} and {nbfiles} other files inside {destination}" : "{origin} y otros {nbfiles} archivos fueron copiados dentro de {destination}", "{newName} already exists" : "{newName} ya existe", "Could not rename \"{fileName}\", it does not exist any more" : "No fue posible renombrar \"{fileName}\", ya no existe", "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "El nombre \"{targetName}\" ya está en uso en la carpeta \"{dir}\". Por favor elege un nombre diferete. ", "Could not rename \"{fileName}\"" : "No fue posible renombrar \"{fileName}\"", "Could not create file \"{file}\"" : "No fue posible crear el archivo \"{file}\"", "Could not create file \"{file}\" because it already exists" : "No fue posible crear el archivo\"{file}\" porque ya existe", "Could not create folder \"{dir}\" because it already exists" : "No fue posible crear la carpeta \"{dir}\" porque ya existe", "Error deleting file \"{fileName}\"." : "Se presentó un error al borrar el archivo \"{fileName}\".", "No search results in other folders for {tag}{filter}{endtag}" : "No se encontraron resultados en otras carpetas para {tag}{filter}{endtag}", "Name" : "Nombre", "Size" : "Tamaño", "Modified" : "Modificado", "_%n folder_::_%n folders_" : ["%n carpeta","%n carpetas"], "_%n file_::_%n files_" : ["%n archivo","%n archivos"], "{dirs} and {files}" : "{dirs} y {files}", "_including %n hidden_::_including %n hidden_" : ["incluyendo %n escondido","incluyendo %n ocultos"], "You don’t have permission to upload or create files here" : "No cuentas con los permisos para cargar o crear archivos aquí", "_Uploading %n file_::_Uploading %n files_" : ["Subiendo %n archivo","Cargando %n archivos"], "New" : "Nuevo", "\"{name}\" is an invalid file name." : "\"{name}\" es un nombre de archivo inválido. ", "File name cannot be empty." : "El nombre de archivo no puede estar vacío.", "\"{name}\" is not an allowed filetype" : "\"{name}\" es un tipo de archivo no permitido", "Storage of {owner} is full, files can not be updated or synced anymore!" : "El espacio de {owner} está lleno. ¡Los archivos ya no se pueden actualizar o sincronizar!", "Your storage is full, files can not be updated or synced anymore!" : "Tu espacio está lleno. ¡Los archivos ya no se pueden actualizar o sincronizar!", "_matches '{filter}'_::_match '{filter}'_" : ["coincide '{filter}'","coincidencia '{filter}'"], "View in folder" : "Ver en la carpeta", "Copied!" : "¡Copiado!", "Copy direct link (only works for users who have access to this file/folder)" : "Copiar liga directa (sólo funciona para usuarios que tienen acceso a este archivo/carpeta)", "Path" : "Ruta", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], "Favorited" : "Marcado como favorito", "Favorite" : "Favorito", "New folder" : "Carpeta nueva", "Upload file" : "Cargar archivo", "Recent" : "Reciente", "Not favorited" : "No es un favorito", "Remove from favorites" : "Eliminar de favoritos", "Add to favorites" : "Agregar a favoritos", "An error occurred while trying to update the tags" : "Se presentó un error al intentar actualizar la etiqueta", "Added to favorites" : "Agregado a los favoritos", "Removed from favorites" : "Eliminado de los favoritos", "You added {file} to your favorites" : "Agregaste {file} a tus favoritos", "You removed {file} from your favorites" : "Eliminaste {file} de tus favoritos", "File changes" : "Cambios al archivo", "Created by {user}" : "Creado por {user}", "Changed by {user}" : "Cambiado por {user}", "Deleted by {user}" : "Borrado por {user}", "Restored by {user}" : "Restaurado por {user}", "Renamed by {user}" : "Renombrado por {user}", "Moved by {user}" : "Movido por {user}", "\"remote user\"" : "\"usuario remoto\"", "You created {file}" : "Creaste {file}", "{user} created {file}" : "{user} creó {file}", "{file} was created in a public folder" : "{file} fue creado en una carpeta pública", "You changed {file}" : "Cambiaste {file}", "{user} changed {file}" : "{user} cambió {file}", "You deleted {file}" : "Borraste {file}", "{user} deleted {file}" : "{user} borró {file}", "You restored {file}" : "Restauraste {file}", "{user} restored {file}" : "{user} restauró {file}", "You renamed {oldfile} to {newfile}" : "Renombraste {oldfile} como {newfile}", "{user} renamed {oldfile} to {newfile}" : "{user} renombró {oldfile} como {newfile}", "You moved {oldfile} to {newfile}" : "Moviste {oldfile} a {newfile}", "{user} moved {oldfile} to {newfile}" : "{user} movió {oldfile} a {newfile}", "A file has been added to or removed from your favorites" : "Un archivo ha sido agregado o eliminado de tus favoritos", "All files" : "Todos los archivos", "Unlimited" : "Ilimitado", "Upload (max. %s)" : "Cargar (max. %s)", "Accept" : "Aceptar", "in %s" : "en %s", "Change" : "Cambiar", "Tags" : "Etiquetas", "%s used" : "%s usado", "%1$s of %2$s used" : "%1$s de %2$s usados", "Settings" : "Configuraciones ", "Show hidden files" : "Mostrar archivos ocultos", "WebDAV" : "WebDAV", "No files in here" : "No hay archivos aquí", "Upload some content or sync with your devices!" : "¡Carga algún contenido o sincroniza con tus dispositivos!", "No entries found in this folder" : "No se encontraron elementos en esta carpeta", "Select all" : "Seleccionar todo", "Upload too large" : "La carga es demasido grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Los archivos que estás intentando cargar sobrepasan el tamaño máximo permitido para la carga de archivos en este servidor.", "No favorites yet" : "Aún no hay favoritos", "Files and folders you mark as favorite will show up here" : "Los archivos y carpetas que marques como favoritos se mostrarán aquí. ", "Deleted files" : "Archivos borrados", "Shares" : "Elementos compartidos", "Shared with others" : "Compartido con otros", "Shared with you" : "Compartido con usted", "Shared by link" : "Compartido por liga", "Text file" : "Archivo de texto", "New text file.txt" : "Nuevo ArchivoDeTexto.txt", "Unshare" : "Dejar de compartir", "Storage of {owner} is almost full ({usedSpacePercent}%)" : "El espacio de {owner} está casi lleno ({usedSpacePercent}%)", "Your storage is almost full ({usedSpacePercent}%)" : "Tu espacio está casi lleno ({usedSpacePercent}%)", "A file or folder has been changed or renamed" : "Un archivo o carpeta ha sido cambiado o renombrado", "A new file or folder has been created" : "Un archivo o carpeta ha sido creado", "A file or folder has been deleted" : "Un archivo o carpeta ha sido borrado", "Limit notifications about creation and changes to your favorite files (Stream only)" : "Limita las notificaciones de la creación y cambios a tus archivos favoritos (sólo flujo)", "A file or folder has been restored" : "Un archivo o carpeta ha sido restaurado" },"pluralForm" :"nplurals=2; plural=(n != 1);" }ue='avatar-work-29'>avatar-work-29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/lib/public/DB/QueryBuilder/IExpressionBuilder.php
blob: 44dc448333f1c60fb5cfa25435bb7e9c28792128 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author Joas Schilling <coding@schilljs.com>
 * @author Robin Appelman <icewind@owncloud.com>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace OCP\DB\QueryBuilder;


use Doctrine\DBAL\Query\Expression\ExpressionBuilder;

/**
 * This class provides a wrapper around Doctrine's ExpressionBuilder
 * @since 8.2.0
 */
interface IExpressionBuilder {
	/**
	 * @since 9.0.0
	 */
	const EQ  = ExpressionBuilder::EQ;
	/**
	 * @since 9.0.0
	 */
	const NEQ = ExpressionBuilder::NEQ;
	/**
	 * @since 9.0.0
	 */
	const LT  = ExpressionBuilder::LT;
	/**
	 * @since 9.0.0
	 */
	const LTE = ExpressionBuilder::LTE;
	/**
	 * @since 9.0.0
	 */
	const GT  = ExpressionBuilder::GT;
	/**
	 * @since 9.0.0
	 */
	const GTE = ExpressionBuilder::GTE;

	/**
	 * Creates a conjunction of the given boolean expressions.
	 *
	 * Example:
	 *
	 *     [php]
	 *     // (u.type = ?) AND (u.role = ?)
	 *     $expr->andX('u.type = ?', 'u.role = ?'));
	 *
	 * @param mixed $x Optional clause. Defaults = null, but requires
	 *                 at least one defined when converting to string.
	 *
	 * @return \OCP\DB\QueryBuilder\ICompositeExpression
	 * @since 8.2.0
	 */
	public function andX($x = null);

	/**
	 * Creates a disjunction of the given boolean expressions.
	 *
	 * Example:
	 *
	 *     [php]
	 *     // (u.type = ?) OR (u.role = ?)
	 *     $qb->where($qb->expr()->orX('u.type = ?', 'u.role = ?'));
	 *
	 * @param mixed $x Optional clause. Defaults = null, but requires
	 *                 at least one defined when converting to string.
	 *
	 * @return \OCP\DB\QueryBuilder\ICompositeExpression
	 * @since 8.2.0
	 */
	public function orX($x = null);

	/**
	 * Creates a comparison expression.
	 *
	 * @param mixed $x The left expression.
	 * @param string $operator One of the IExpressionBuilder::* constants.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function comparison($x, $operator, $y, $type = null);

	/**
	 * Creates an equality comparison expression with the given arguments.
	 *
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> = <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id = ?
	 *     $expr->eq('u.id', '?');
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function eq($x, $y, $type = null);

	/**
	 * Creates a non equality comparison expression with the given arguments.
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> <> <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id <> 1
	 *     $q->where($q->expr()->neq('u.id', '1'));
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function neq($x, $y, $type = null);

	/**
	 * Creates a lower-than comparison expression with the given arguments.
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> < <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id < ?
	 *     $q->where($q->expr()->lt('u.id', '?'));
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function lt($x, $y, $type = null);

	/**
	 * Creates a lower-than-equal comparison expression with the given arguments.
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> <= <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id <= ?
	 *     $q->where($q->expr()->lte('u.id', '?'));
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function lte($x, $y, $type = null);

	/**
	 * Creates a greater-than comparison expression with the given arguments.
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> > <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id > ?
	 *     $q->where($q->expr()->gt('u.id', '?'));
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function gt($x, $y, $type = null);

	/**
	 * Creates a greater-than-equal comparison expression with the given arguments.
	 * First argument is considered the left expression and the second is the right expression.
	 * When converted to string, it will generated a <left expr> >= <right expr>. Example:
	 *
	 *     [php]
	 *     // u.id >= ?
	 *     $q->where($q->expr()->gte('u.id', '?'));
	 *
	 * @param mixed $x The left expression.
	 * @param mixed $y The right expression.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function gte($x, $y, $type = null);

	/**
	 * Creates an IS NULL expression with the given arguments.
	 *
	 * @param string $x The field in string format to be restricted by IS NULL.
	 *
	 * @return string
	 * @since 8.2.0
	 */
	public function isNull($x);

	/**
	 * Creates an IS NOT NULL expression with the given arguments.
	 *
	 * @param string $x The field in string format to be restricted by IS NOT NULL.
	 *
	 * @return string
	 * @since 8.2.0
	 */
	public function isNotNull($x);

	/**
	 * Creates a LIKE() comparison expression with the given arguments.
	 *
	 * @param string $x Field in string format to be inspected by LIKE() comparison.
	 * @param mixed $y Argument to be used in LIKE() comparison.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function like($x, $y, $type = null);

	/**
	 * Creates a NOT LIKE() comparison expression with the given arguments.
	 *
	 * @param string $x Field in string format to be inspected by NOT LIKE() comparison.
	 * @param mixed $y Argument to be used in NOT LIKE() comparison.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function notLike($x, $y, $type = null);

	/**
	 * Creates a ILIKE() comparison expression with the given arguments.
	 *
	 * @param string $x Field in string format to be inspected by ILIKE() comparison.
	 * @param mixed $y Argument to be used in ILIKE() comparison.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 9.0.0
	 */
	public function iLike($x, $y, $type = null);

	/**
	 * Creates a IN () comparison expression with the given arguments.
	 *
	 * @param string $x The field in string format to be inspected by IN() comparison.
	 * @param string|array $y The placeholder or the array of values to be used by IN() comparison.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function in($x, $y, $type = null);

	/**
	 * Creates a NOT IN () comparison expression with the given arguments.
	 *
	 * @param string $x The field in string format to be inspected by NOT IN() comparison.
	 * @param string|array $y The placeholder or the array of values to be used by NOT IN() comparison.
	 * @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
	 *                  required when comparing text fields for oci compatibility
	 *
	 * @return string
	 * @since 8.2.0 - Parameter $type was added in 9.0.0
	 */
	public function notIn($x, $y, $type = null);

	/**
	 * Quotes a given input parameter.
	 *
	 * @param mixed $input The parameter to be quoted.
	 * @param mixed|null $type One of the IQueryBuilder::PARAM_* constants
	 *
	 * @return string
	 * @since 8.2.0
	 */
	public function literal($input, $type = null);

	/**
	 * Returns a IQueryFunction that casts the column to the given type
	 *
	 * @param string $column
	 * @param mixed $type One of IQueryBuilder::PARAM_*
	 * @return string
	 * @since 9.0.0
	 */
	public function castColumn($column, $type);
}