/* * Copyright (c) 2011 SURFnet bv * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package pb_orm_test; import "orm.proto"; enum TestEnum { one = 1; two = 2; three = 3; } message Point { optional float x = 1 [default=0.0]; optional float y = 2 [default=0.0]; } message BigMessage { optional bool f_bool = 1 [default=true]; optional int32 f_int32 = 2 [default=123]; optional sint32 f_sint32 = 3 [default=-456]; optional sfixed32 f_sfixed32 = 4 [default=-789]; optional uint32 f_uint32 = 5 [default=456]; optional fixed32 f_fixed32 = 6 [default=789]; optional int64 f_int64 = 7 [default=123]; optional sint64 f_sint64 = 8 [default=123]; optional sfixed64 f_sfixed64 = 9 [default=123]; optional uint64 f_uint64 = 10 [default=123]; optional fixed64 f_fixed64 = 11 [default=123]; optional float f_float = 12 [default=123.456]; optional double f_double = 13 [default=456.789]; optional string f_string = 14 [default='dit is tekst']; optional bytes f_bytes = 15; optional TestEnum f_testenum = 16 [default=two]; optional Point p1 = 17; optional int64 f_datetime = 18 [(orm.column).type=DATETIME,(orm.column).default="2011-12-31 13:59:59"]; optional int64 f_date = 19 [(orm.column).type=DATE, (orm.column).default="2011-12-31"]; optional int64 f_time = 20 [(orm.column).type=TIME, (orm.column).default="13:59:59"]; optional uint32 f_year = 21 [default=2011]; // [(orm.column).type=YEAR, (orm.column).default="2011"] doesn't work with SQLite3 DB when accessed via libdbi ; optional Point p2 = 22; } message BigMessageRepeated { // repeated fields repeated bool f_bools = 1; repeated int32 f_int32s = 2; repeated sint32 f_sint32s = 3; repeated sfixed32 f_sfixed32s = 4; repeated uint32 f_uint32s = 5; repeated fixed32 f_fixed32s = 6; repeated int64 f_int64s = 7; repeated sint64 f_sint64s = 8; repeated sfixed64 f_sfixed64s = 9; repeated uint64 f_uint64s = 10; repeated fixed64 f_fixed64s = 11; repeated float f_floats = 12; repeated double f_doubles = 13; repeated string f_strings = 14; repeated bytes f_bytess = 15; repeated TestEnum f_testenums = 16; repeated Point f_points = 17; repeated int64 f_datetimes = 18 [(orm.column).type=DATETIME]; repeated int64 f_dates = 19 [(orm.column).type=DATE]; repeated int64 f_times = 20 [(orm.column).type=TIME]; repeated uint32 f_years = 21; // [(orm.column).type=YEAR] doesn't work with SQLite3 DB when accessed via libdbi repeated int64 f_leave_empty = 22; }