Lines Matching defs:cur_map
28 struct dict_sql_map cur_map;
90 pattern = t_str_new(strlen(ctx->cur_map.pattern) + 1);
93 p_array_init(&ctx->cur_map.sql_fields, ctx->pool, count);
94 for (p = ctx->cur_map.pattern; *p != '\0';) {
116 array_append(&ctx->cur_map.sql_fields,
130 ctx->cur_map.pattern = p_strdup(ctx->pool, str_c(pattern));
154 if (ctx->cur_map.pattern == NULL)
156 if (ctx->cur_map.table == NULL)
158 if (ctx->cur_map.value_field == NULL)
161 ctx->cur_map.value_fields = (const char *const *)
162 p_strsplit_spaces(ctx->pool, ctx->cur_map.value_field, ",");
163 ctx->cur_map.values_count = str_array_length(ctx->cur_map.value_fields);
166 p_new(ctx->pool, enum dict_sql_type, ctx->cur_map.values_count);
167 if (ctx->cur_map.value_type != NULL) {
169 t_strsplit_spaces(ctx->cur_map.value_type, ",");
170 if (str_array_length(types) != ctx->cur_map.values_count)
172 for (i = 0; i < ctx->cur_map.values_count; i++) {
177 for (i = 0; i < ctx->cur_map.values_count; i++) {
178 value_types[i] = ctx->cur_map.value_hexblob ?
182 ctx->cur_map.value_types = value_types;
184 if (ctx->cur_map.username_field == NULL) {
186 ctx->cur_map.username_field = "'username_field not set'";
189 if (!array_is_created(&ctx->cur_map.sql_fields)) {
191 p_array_init(&ctx->cur_map.sql_fields, ctx->pool, 1);
192 if (strchr(ctx->cur_map.pattern, '$') != NULL)
195 array_append(&ctx->set->maps, &ctx->cur_map, 1);
196 i_zero(&ctx->cur_map);
217 &ctx->cur_map, key, value);