Procházet zdrojové kódy

Moved the doxygen leobject_filter in lecrud + update it

Yann Weber před 9 roky
rodič
revize
9b012f2566
2 změnil soubory, kde provedl 43 přidání a 43 odebrání
  1. 43
    0
      leapi/lecrud.py
  2. 0
    43
      leapi/leobject.py

+ 43
- 0
leapi/lecrud.py Zobrazit soubor

@@ -467,3 +467,46 @@ class _LeCrud(object):
467 467
     def _field_is_relational(field):
468 468
         return field.startswith('superior.') or field.startswith('subordinate')
469 469
 
470
+## @page leobject_filters LeObject query filters
471
+# The LeObject API provide methods that accept filters allowing the user
472
+# to query the database and fetch LodelEditorialObjects.
473
+#
474
+# The LeObject API translate those filters for the datasource. 
475
+# 
476
+# @section api_user_side API user side filters
477
+# Filters are string expressing a condition. The string composition
478
+# is as follow : "<FIELD> <OPERATOR> <VALUE>"
479
+# @subsection fpart FIELD
480
+# @subsubsection standart fields
481
+# Standart fields, represents a value of the LeObject for example "title", "lodel_id" etc.
482
+# @subsubsection rfields relationnal fields
483
+# relationnal fields, represents a relation with the object hierarchy. Those fields are composed as follow :
484
+# "<RELATION>.<NATURE>".
485
+#
486
+# - Relation can takes two values : superiors or subordinates
487
+# - Nature is a relation nature ( see EditorialModel.classtypes )
488
+# Examples : "superiors.parent", "subordinates.translation" etc.
489
+# @note The field_list arguement of leapi.leapi._LeObject.get() use the same syntax than the FIELD filter part 
490
+# @subsection oppart OPERATOR
491
+# The OPERATOR part of a filter is a comparison operator. There is
492
+# - standart comparison operators : = , <, > , <=, >=, !=
493
+# - vagueness string comparison 'like' and 'not like'
494
+# - list operators : 'in' and 'not in'
495
+# The list of allowed operators is sotred at leapi.leapi._LeObject._query_operators . 
496
+# @subsection valpart VALUE
497
+# The VALUE part of a filter is... just a value...
498
+#
499
+# @section datasource_side Datasource side filters
500
+# As said above the API "translate" filters before forwarding them to the datasource. 
501
+#
502
+# The translation process transform filters in tuple composed of 3 elements
503
+# ( @ref fpart , @ref oppart , @ref valpart ). Each element is a string.
504
+#
505
+# There is a special case for @ref rfields : the field element is a tuple composed with two elements
506
+# ( RELATION, NATURE ) where NATURE is a string ( see EditorialModel.classtypes ) and RELATION is one of
507
+# the defined constant : 
508
+#
509
+# - leapi.leapi.REL_SUB for "subordinates"
510
+# - leapi.leapi.REL_SUP for "superiors"
511
+#
512
+# @note The filters translation process also check if given field are valids compared to the concerned letype and/or the leclass

+ 0
- 43
leapi/leobject.py Zobrazit soubor

@@ -353,46 +353,3 @@ class LeObjectError(Exception):
353 353
 
354 354
 class LeObjectQueryError(LeObjectError):
355 355
     pass
356
-
357
-## @page leobject_filters LeObject query filters
358
-# The LeObject API provide methods that accept filters allowing the user
359
-# to query the database and fetch LodelEditorialObjects.
360
-#
361
-# The LeObject API translate those filters for the datasource. 
362
-# 
363
-# @section api_user_side API user side filters
364
-# Filters are string expressing a condition. The string composition
365
-# is as follow : "<FIELD> <OPERATOR> <VALUE>"
366
-# @subsection fpart FIELD
367
-# @subsubsection standart fields
368
-# Standart fields, represents a value of the LeObject for example "title", "lodel_id" etc.
369
-# @subsubsection rfields relationnal fields
370
-# relationnal fields, represents a relation with the object hierarchy. Those fields are composed as follow :
371
-# "<RELATION>.<NATURE>".
372
-#
373
-# - Relation can takes two values : superiors or subordinates
374
-# - Nature is a relation nature ( see EditorialModel.classtypes )
375
-# Examples : "superiors.parent", "subordinates.translation" etc.
376
-# @note The field_list arguement of leapi.leapi._LeObject.get() use the same syntax than the FIELD filter part 
377
-# @subsection oppart OPERATOR
378
-# The OPERATOR part of a filter is a comparison operator. There is
379
-# - standart comparison operators : = , <, > , <=, >=, !=
380
-# - list operators : 'in' and 'not in'
381
-# The list of allowed operators is sotred at leapi.leapi._LeObject._query_operators . 
382
-# @subsection valpart VALUE
383
-# The VALUE part of a filter is... just a value...
384
-#
385
-# @section datasource_side Datasource side filters
386
-# As said above the API "translate" filters before forwarding them to the datasource. 
387
-#
388
-# The translation process transform filters in tuple composed of 3 elements
389
-# ( @ref fpart , @ref oppart , @ref valpart ). Each element is a string.
390
-#
391
-# There is a special case for @ref rfields : the field element is a tuple composed with two elements
392
-# ( RELATION, NATURE ) where NATURE is a string ( see EditorialModel.classtypes ) and RELATION is one of
393
-# the defined constant : 
394
-#
395
-# - leapi.leapi.REL_SUB for "subordinates"
396
-# - leapi.leapi.REL_SUP for "superiors"
397
-#
398
-# @note The filters translation process also check if given field are valids compared to the concerned letype and/or the leclass

Loading…
Zrušit
Uložit