Closed vaind closed 3 years ago
Should it be documented in the command help more clearly that one can remove entities using a directory/glob path?
I've updated the docs a little:
./objectbox-generator --help
Usage:
objectbox-generator [flags] {path}
* to execute "clean" action (see below) on the path, removing previously generated code and missing entities,
* and execute code generation on the path afterwards.
The given {path} can be one of the following:
* directory - a non-recursive clean and generation is performed on the given directory,
* a glob path pattern (e.g. contains a "*") - performs clean and generation on the matching paths,
* a Go-style path pattern (e.g. "./..." - a recursive match of the current dir) - performs clean and generation on the matching paths,
or
objectbox-generator [flags] {model/file/path.fbs}
to generate the binding code for a single file
or
objectbox-generator [flags] clean {path}
to remove the generated files instead of creating them - this removes *.obx.* and objectbox-model.h but keeps objectbox-model.json
or
objectbox-generator FLATC [flatc arguments]
to execute FlatBuffers flatc command line tool Any arguments after the FLATC keyword are passed through.
path:
* a source file path or a valid path pattern (e.g. ./...)
Available flags:
-c generate plain C code
-cpp
generate C++ code
-go
generate Go code
-help
print this help
-optional string
C++ wrapper type to use for fields annotated "optional"; one of: std::optional, std::unique_ptr, std::shared_ptr
-out string
output path for generated source files
-persist string
path to the model information persistence file (JSON)
-version
print the generator version info
I've updated the docs a little:
👍
Closes #22
Adds support for:
Keeps existing behaviour without change (when called with a single file) - entities are not removed from the model but built-up incrementally (when called on multiple fbs files)