/ PrepareWriting: Prepare the line for WriteDB. */ /
| 1246 | /* PrepareWriting: Prepare the line for WriteDB. */ |
| 1247 | /***********************************************************************/ |
| 1248 | bool TDBJSN::PrepareWriting(PGLOBAL g) |
| 1249 | { |
| 1250 | PSZ s; |
| 1251 | |
| 1252 | if (MakeTopTree(g, Row)) |
| 1253 | return true; |
| 1254 | |
| 1255 | if ((s = Serialize(G, Top, NULL, Pretty))) { |
| 1256 | if (Comma) |
| 1257 | strcat(s, ","); |
| 1258 | |
| 1259 | if ((signed)strlen(s) > Lrecl) { |
| 1260 | safe_strcpy(To_Line, Lrecl, s); |
| 1261 | snprintf(g->Message, sizeof(g->Message), "Line truncated (lrecl=%d)", Lrecl); |
| 1262 | return PushWarning(g, this); |
| 1263 | } else |
| 1264 | strcpy(To_Line, s); |
| 1265 | |
| 1266 | return false; |
| 1267 | } else |
| 1268 | return true; |
| 1269 | |
| 1270 | } // end of PrepareWriting |
| 1271 | |
| 1272 | /***********************************************************************/ |
| 1273 | /* WriteDB: Data Base write routine for JSON access method. */ |
nothing calls this directly
no test coverage detected