id_join1, id_join2, 0);
gda_sql_builder_select_join_targets (sqlbuilder, id_target1, id_target2,
- GDA_SQL_SELECT_JOIN_INNER, join_cond);
+ field->decode_join_type == GDAEX_QE_JOIN_TYPE_LEFT ? GDA_SQL_SELECT_JOIN_LEFT : GDA_SQL_SELECT_JOIN_INNER,
+ join_cond);
gda_sql_builder_select_add_field (sqlbuilder, field->decode_field_to_show,
field->decode_table2,
alias != NULL && g_strcmp0 (alias, "") != 0 ? alias : field->decode_field_alias);
GDAEX_QE_WHERE_TYPE_IS_NULL = 4096
} GdaExQueryEditorWhereType;
+typedef enum
+ {
+ GDAEX_QE_JOIN_TYPE_INNER,
+ GDAEX_QE_JOIN_TYPE_LEFT
+ } GdaExQueryEditorJoinType;
+
#define GDAEX_QE_WHERE_TYPE_STRING GDAEX_QE_WHERE_TYPE_STARTS | GDAEX_QE_WHERE_TYPE_CONTAINS | GDAEX_QE_WHERE_TYPE_ENDS | GDAEX_QE_WHERE_TYPE_ISTARTS | GDAEX_QE_WHERE_TYPE_ICONTAINS | GDAEX_QE_WHERE_TYPE_IENDS
#define GDAEX_QE_WHERE_TYPE_NUMBER GDAEX_QE_WHERE_TYPE_EQUAL | GDAEX_QE_WHERE_TYPE_GREAT | GDAEX_QE_WHERE_TYPE_GREAT_EQUAL | GDAEX_QE_WHERE_TYPE_LESS | GDAEX_QE_WHERE_TYPE_LESS_EQUAL | GDAEX_QE_WHERE_TYPE_BETWEEN
* to refactor
*/
gchar *decode_table2;
+ GdaExQueryEditorJoinType decode_join_type;
/* TODO
GSList *decode_fields1;
GSList *decode_fields2;
field->for_show = TRUE;
field->for_where = TRUE;
field->decode_table2 = g_strdup ("cities");
+ field->decode_join_type = GDAEX_QE_JOIN_TYPE_LEFT;
/*field->decode_fields1 = g_slist_append (field->decode_fields1, "id_cities");
field->decode_fields2 = g_slist_append (field->decode_fields2, "id");*/
field->decode_field2 = g_strdup ("id");