GomCommandBuilder

## GomCommandBuilder GomCommandBuilder |

## Functions

#define | GOM_COMMAND_BUILDER_CONST()
GomCommand * | gom_command_builder_build_count ()
GomCommand * | gom_command_builder_build_delete ()
GomCommand * | gom_command_builder_build_select ()
GomCommand * | gom_command_builder_build_insert ()
GomCommand * | gom_command_builder_build_update ()
GList * | gom_command_builder_build_create ()

## Properties

GomAdapter * | adapter | Read / Write / Construct Only
GomFilter * | filter | Read / Write
guint | limit | Read / Write
gchar * | m2m-table | Read / Write / Construct Only
GType * | m2m-type | Read / Write / Construct Only
guint | offset | Read / Write
GType * | resource-type | Read / Write
GomSorting * | sorting | Read / Write

## Object Hierarchy

        GObject
        ╰── GomCommandBuilder

## Description

## Functions

### GOM_COMMAND_BUILDER_CONST()

    #define GOM_COMMAND_BUILDER_CONST(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOM_TYPE_COMMAND_BUILDER, GomCommandBuilder const))

### gom_command_builder_build_count ()

    GomCommand *
    gom_command_builder_build_count (GomCommandBuilder *builder);

Builds a new command that will count the number of rows matching the current query parameters.

#### Parameters

builder | A GomCommandBuilder. | [in]

#### Returns

A GomCommand.

[transfer full]

### gom_command_builder_build_delete ()

    GomCommand *
    gom_command_builder_build_delete (GomCommandBuilder *builder);

Builds a new GomCommand to delete the rows matching the current query params.

#### Parameters

builder | A GomCommandBuilder. | [in]

#### Returns

A GomCommand.

[transfer full]

### gom_command_builder_build_select ()

    GomCommand *
    gom_command_builder_build_select (GomCommandBuilder *builder);

Builds a GomCommand that will select all the rows matching the current query params.

#### Parameters

builder | A GomCommandBuilder. | [in]

#### Returns

A GomCommand.

[transfer full]

### gom_command_builder_build_insert ()

    GomCommand *
    gom_command_builder_build_insert (GomCommandBuilder *builder,
                                      GomResource *resource);

Builds a new GomCommand that will insert the parameters of the resource into the underlying database.

#### Parameters

builder | A GomCommandBuilder. |
resource | a GomResource |

#### Returns

A GomCommand.

[transfer full]

### gom_command_builder_build_update ()

    GomCommand *
    gom_command_builder_build_update (GomCommandBuilder *builder,
                                      GomResource *resource);

Builds a new GomCommand that will update the contents stored for `resource` in the underlying database.

#### Parameters

builder | A GomCommandBuilder. |
resource | a GomResource |

#### Returns

A GomCommand.

[transfer full]

### gom_command_builder_build_create ()

    GList *
    gom_command_builder_build_create (GomCommandBuilder *builder,
                                      guint version);

Builds a list of GomCommand to update the table for the resource_type associated with `builder` up to `version` .

#### Parameters

builder | A GomCommandBuilder. | [in]
version | the version of the database. |

#### Returns

A GList of GomCommand.

[element-type GomCommand][transfer full]

## Types and Values

## Property Details

### The `“adapter”` property

      “adapter”                  GomAdapter *

The GomAdapter.

Flags: Read / Write / Construct Only

### The `“filter”` property

      “filter”                   GomFilter *

The filter for the command.

Flags: Read / Write

### The `“limit”` property

      “limit”                    guint

The maximum number of results.

Flags: Read / Write

Default value: 0

### The `“m2m-table”` property

      “m2m-table”                gchar *

The table to use for many-to-many queries.

Flags: Read / Write / Construct Only

Default value: NULL

### The `“m2m-type”` property

      “m2m-type”                 GType *

The type for the join within m2m-table.

Flags: Read / Write / Construct Only

Allowed values: GomResource

### The `“offset”` property

      “offset”                   guint

The number of results to skip.

Flags: Read / Write

Default value: 0

### The `“resource-type”` property

      “resource-type”            GType *

The resource type to query for.

Flags: Read / Write

Allowed values: GomResource

### The `“sorting”` property

      “sorting”                  GomSorting *

The sorting for the command.

Flags: Read / Write