Changeset 12026 for trunk/ippdb/tests/insertobject.c
- Timestamp:
- Feb 23, 2007, 4:28:07 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippdb/tests/insertobject.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/tests/insertobject.c
r11988 r12026 249 249 { 250 250 psDB *dbh; 251 p1PendingExpRow *object;252 253 dbh = psDBInit("localhost", "test", NULL, "test"); 254 if (!dbh) { 255 exit(EXIT_FAILURE); 256 } 257 258 object = p1PendingExpRowAlloc("a string", -32, "a string");259 if (!object) { 260 exit(EXIT_FAILURE); 261 } 262 263 if (! p1PendingExpInsertObject(dbh, object)) {264 exit(EXIT_FAILURE); 265 } 266 267 psFree(object); 268 psDBCleanup(dbh); 269 } 270 271 { 272 psDB *dbh; 273 p2PendingExpRow *object;274 275 dbh = psDBInit("localhost", "test", NULL, "test"); 276 if (!dbh) { 277 exit(EXIT_FAILURE); 278 } 279 280 object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string");281 if (!object) { 282 exit(EXIT_FAILURE); 283 } 284 285 if (! p2PendingExpInsertObject(dbh, object)) {286 exit(EXIT_FAILURE); 287 } 288 289 psFree(object); 290 psDBCleanup(dbh); 291 } 292 293 { 294 psDB *dbh; 295 p2PendingImfileRow *object;296 297 dbh = psDBInit("localhost", "test", NULL, "test"); 298 if (!dbh) { 299 exit(EXIT_FAILURE); 300 } 301 302 object = p2PendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string");303 if (!object) { 304 exit(EXIT_FAILURE); 305 } 306 307 if (! p2PendingImfileInsertObject(dbh, object)) {308 exit(EXIT_FAILURE); 309 } 310 311 psFree(object); 312 psDBCleanup(dbh); 313 } 314 315 { 316 psDB *dbh; 317 p2ProcessedExpRow *object;318 319 dbh = psDBInit("localhost", "test", NULL, "test"); 320 if (!dbh) { 321 exit(EXIT_FAILURE); 322 } 323 324 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");325 if (!object) { 326 exit(EXIT_FAILURE); 327 } 328 329 if (! p2ProcessedExpInsertObject(dbh, object)) {330 exit(EXIT_FAILURE); 331 } 332 333 psFree(object); 334 psDBCleanup(dbh); 335 } 336 337 { 338 psDB *dbh; 339 p2MaskRow*object;340 341 dbh = psDBInit("localhost", "test", NULL, "test"); 342 if (!dbh) { 343 exit(EXIT_FAILURE); 344 } 345 346 object = p2MaskRowAlloc("a string");347 if (!object) { 348 exit(EXIT_FAILURE); 349 } 350 351 if (! p2MaskInsertObject(dbh, object)) {352 exit(EXIT_FAILURE); 353 } 354 355 psFree(object); 356 psDBCleanup(dbh); 357 } 358 359 { 360 psDB *dbh; 361 p2ProcessedImfileRow *object;362 363 dbh = psDBInit("localhost", "test", NULL, "test"); 364 if (!dbh) { 365 exit(EXIT_FAILURE); 366 } 367 368 object = p2ProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);369 if (!object) { 370 exit(EXIT_FAILURE); 371 } 372 373 if (! p2ProcessedImfileInsertObject(dbh, object)) {374 exit(EXIT_FAILURE); 375 } 376 377 psFree(object); 378 psDBCleanup(dbh); 379 } 380 381 { 382 psDB *dbh; 383 p3PendingExpRow *object;384 385 dbh = psDBInit("localhost", "test", NULL, "test"); 386 if (!dbh) { 387 exit(EXIT_FAILURE); 388 } 389 390 object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");391 if (!object) { 392 exit(EXIT_FAILURE); 393 } 394 395 if (! p3PendingExpInsertObject(dbh, object)) {396 exit(EXIT_FAILURE); 397 } 398 399 psFree(object); 400 psDBCleanup(dbh); 401 } 402 403 { 404 psDB *dbh; 405 p3ProcessedExpRow *object;406 407 dbh = psDBInit("localhost", "test", NULL, "test"); 408 if (!dbh) { 409 exit(EXIT_FAILURE); 410 } 411 412 object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string");413 if (!object) { 414 exit(EXIT_FAILURE); 415 } 416 417 if (! p3ProcessedExpInsertObject(dbh, object)) {418 exit(EXIT_FAILURE); 419 } 420 421 psFree(object); 422 psDBCleanup(dbh); 423 } 424 425 { 426 psDB *dbh; 427 p3MaskRow*object;428 429 dbh = psDBInit("localhost", "test", NULL, "test"); 430 if (!dbh) { 431 exit(EXIT_FAILURE); 432 } 433 434 object = p3MaskRowAlloc("a string");435 if (!object) { 436 exit(EXIT_FAILURE); 437 } 438 439 if (! p3MaskInsertObject(dbh, object)) {251 guidePendingExpRow *object; 252 253 dbh = psDBInit("localhost", "test", NULL, "test"); 254 if (!dbh) { 255 exit(EXIT_FAILURE); 256 } 257 258 object = guidePendingExpRowAlloc("a string", -32, "a string"); 259 if (!object) { 260 exit(EXIT_FAILURE); 261 } 262 263 if (!guidePendingExpInsertObject(dbh, object)) { 264 exit(EXIT_FAILURE); 265 } 266 267 psFree(object); 268 psDBCleanup(dbh); 269 } 270 271 { 272 psDB *dbh; 273 chipPendingExpRow *object; 274 275 dbh = psDBInit("localhost", "test", NULL, "test"); 276 if (!dbh) { 277 exit(EXIT_FAILURE); 278 } 279 280 object = chipPendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string"); 281 if (!object) { 282 exit(EXIT_FAILURE); 283 } 284 285 if (!chipPendingExpInsertObject(dbh, object)) { 286 exit(EXIT_FAILURE); 287 } 288 289 psFree(object); 290 psDBCleanup(dbh); 291 } 292 293 { 294 psDB *dbh; 295 chipPendingImfileRow *object; 296 297 dbh = psDBInit("localhost", "test", NULL, "test"); 298 if (!dbh) { 299 exit(EXIT_FAILURE); 300 } 301 302 object = chipPendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 303 if (!object) { 304 exit(EXIT_FAILURE); 305 } 306 307 if (!chipPendingImfileInsertObject(dbh, object)) { 308 exit(EXIT_FAILURE); 309 } 310 311 psFree(object); 312 psDBCleanup(dbh); 313 } 314 315 { 316 psDB *dbh; 317 chipProcessedExpRow *object; 318 319 dbh = psDBInit("localhost", "test", NULL, "test"); 320 if (!dbh) { 321 exit(EXIT_FAILURE); 322 } 323 324 object = chipProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 325 if (!object) { 326 exit(EXIT_FAILURE); 327 } 328 329 if (!chipProcessedExpInsertObject(dbh, object)) { 330 exit(EXIT_FAILURE); 331 } 332 333 psFree(object); 334 psDBCleanup(dbh); 335 } 336 337 { 338 psDB *dbh; 339 chipMaskRow *object; 340 341 dbh = psDBInit("localhost", "test", NULL, "test"); 342 if (!dbh) { 343 exit(EXIT_FAILURE); 344 } 345 346 object = chipMaskRowAlloc("a string"); 347 if (!object) { 348 exit(EXIT_FAILURE); 349 } 350 351 if (!chipMaskInsertObject(dbh, object)) { 352 exit(EXIT_FAILURE); 353 } 354 355 psFree(object); 356 psDBCleanup(dbh); 357 } 358 359 { 360 psDB *dbh; 361 chipProcessedImfileRow *object; 362 363 dbh = psDBInit("localhost", "test", NULL, "test"); 364 if (!dbh) { 365 exit(EXIT_FAILURE); 366 } 367 368 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16); 369 if (!object) { 370 exit(EXIT_FAILURE); 371 } 372 373 if (!chipProcessedImfileInsertObject(dbh, object)) { 374 exit(EXIT_FAILURE); 375 } 376 377 psFree(object); 378 psDBCleanup(dbh); 379 } 380 381 { 382 psDB *dbh; 383 camPendingExpRow *object; 384 385 dbh = psDBInit("localhost", "test", NULL, "test"); 386 if (!dbh) { 387 exit(EXIT_FAILURE); 388 } 389 390 object = camPendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 391 if (!object) { 392 exit(EXIT_FAILURE); 393 } 394 395 if (!camPendingExpInsertObject(dbh, object)) { 396 exit(EXIT_FAILURE); 397 } 398 399 psFree(object); 400 psDBCleanup(dbh); 401 } 402 403 { 404 psDB *dbh; 405 camProcessedExpRow *object; 406 407 dbh = psDBInit("localhost", "test", NULL, "test"); 408 if (!dbh) { 409 exit(EXIT_FAILURE); 410 } 411 412 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string"); 413 if (!object) { 414 exit(EXIT_FAILURE); 415 } 416 417 if (!camProcessedExpInsertObject(dbh, object)) { 418 exit(EXIT_FAILURE); 419 } 420 421 psFree(object); 422 psDBCleanup(dbh); 423 } 424 425 { 426 psDB *dbh; 427 camMaskRow *object; 428 429 dbh = psDBInit("localhost", "test", NULL, "test"); 430 if (!dbh) { 431 exit(EXIT_FAILURE); 432 } 433 434 object = camMaskRowAlloc("a string"); 435 if (!object) { 436 exit(EXIT_FAILURE); 437 } 438 439 if (!camMaskInsertObject(dbh, object)) { 440 440 exit(EXIT_FAILURE); 441 441 } … … 689 689 { 690 690 psDB *dbh; 691 p4RunRow*object;692 693 dbh = psDBInit("localhost", "test", NULL, "test"); 694 if (!dbh) { 695 exit(EXIT_FAILURE); 696 } 697 698 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");699 if (!object) { 700 exit(EXIT_FAILURE); 701 } 702 703 if (! p4RunInsertObject(dbh, object)) {704 exit(EXIT_FAILURE); 705 } 706 707 psFree(object); 708 psDBCleanup(dbh); 709 } 710 711 { 712 psDB *dbh; 713 p4InputExpRow*object;714 715 dbh = psDBInit("localhost", "test", NULL, "test"); 716 if (!dbh) { 717 exit(EXIT_FAILURE); 718 } 719 720 object = p4InputExpRowAlloc(-32, "a string", -32, true);721 if (!object) { 722 exit(EXIT_FAILURE); 723 } 724 725 if (! p4InputExpInsertObject(dbh, object)) {726 exit(EXIT_FAILURE); 727 } 728 729 psFree(object); 730 psDBCleanup(dbh); 731 } 732 733 { 734 psDB *dbh; 735 p4SkyCellMapRow *object;736 737 dbh = psDBInit("localhost", "test", NULL, "test"); 738 if (!dbh) { 739 exit(EXIT_FAILURE); 740 } 741 742 object = p4SkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string");743 if (!object) { 744 exit(EXIT_FAILURE); 745 } 746 747 if (! p4SkyCellMapInsertObject(dbh, object)) {748 exit(EXIT_FAILURE); 749 } 750 751 psFree(object); 752 psDBCleanup(dbh); 753 } 754 755 { 756 psDB *dbh; 757 p4SkyfileRow*object;758 759 dbh = psDBInit("localhost", "test", NULL, "test"); 760 if (!dbh) { 761 exit(EXIT_FAILURE); 762 } 763 764 object = p4SkyfileRowAlloc(-32, "a string", "a string", "a string", 64.64, 64.64);765 if (!object) { 766 exit(EXIT_FAILURE); 767 } 768 769 if (! p4SkyfileInsertObject(dbh, object)) {770 exit(EXIT_FAILURE); 771 } 772 773 psFree(object); 774 psDBCleanup(dbh); 775 } 776 777 { 778 psDB *dbh; 779 p5RunRow*object;780 781 dbh = psDBInit("localhost", "test", NULL, "test"); 782 if (!dbh) { 783 exit(EXIT_FAILURE); 784 } 785 786 object = p5RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");787 if (!object) { 788 exit(EXIT_FAILURE); 789 } 790 791 if (! p5RunInsertObject(dbh, object)) {792 exit(EXIT_FAILURE); 793 } 794 795 psFree(object); 796 psDBCleanup(dbh); 797 } 798 799 { 800 psDB *dbh; 801 p5InputSkyfileRow *object;802 803 dbh = psDBInit("localhost", "test", NULL, "test"); 804 if (!dbh) { 805 exit(EXIT_FAILURE); 806 } 807 808 object = p5InputSkyfileRowAlloc(-32, -32, "a string", "a string", "a string", true);809 if (!object) { 810 exit(EXIT_FAILURE); 811 } 812 813 if (! p5InputSkyfileInsertObject(dbh, object)) {814 exit(EXIT_FAILURE); 815 } 816 817 psFree(object); 818 psDBCleanup(dbh); 819 } 820 821 { 822 psDB *dbh; 823 p5DiffSkyfileRow*object;824 825 dbh = psDBInit("localhost", "test", NULL, "test"); 826 if (!dbh) { 827 exit(EXIT_FAILURE); 828 } 829 830 object = p5DiffSkyfileRowAlloc(-32, "a string", 64.64, 64.64);831 if (!object) { 832 exit(EXIT_FAILURE); 833 } 834 835 if (! p5DiffSkyfileInsertObject(dbh, object)) {836 exit(EXIT_FAILURE); 837 } 838 839 psFree(object); 840 psDBCleanup(dbh); 841 } 842 843 { 844 psDB *dbh; 845 p6RunRow*object;846 847 dbh = psDBInit("localhost", "test", NULL, "test"); 848 if (!dbh) { 849 exit(EXIT_FAILURE); 850 } 851 852 object = p6RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");853 if (!object) { 854 exit(EXIT_FAILURE); 855 } 856 857 if (! p6RunInsertObject(dbh, object)) {858 exit(EXIT_FAILURE); 859 } 860 861 psFree(object); 862 psDBCleanup(dbh); 863 } 864 865 { 866 psDB *dbh; 867 p6InputSkyfileRow *object;868 869 dbh = psDBInit("localhost", "test", NULL, "test"); 870 if (!dbh) { 871 exit(EXIT_FAILURE); 872 } 873 874 object = p6InputSkyfileRowAlloc(-32, -32);875 if (!object) { 876 exit(EXIT_FAILURE); 877 } 878 879 if (! p6InputSkyfileInsertObject(dbh, object)) {880 exit(EXIT_FAILURE); 881 } 882 883 psFree(object); 884 psDBCleanup(dbh); 885 } 886 887 { 888 psDB *dbh; 889 p6SumSkyfileRow *object;890 891 dbh = psDBInit("localhost", "test", NULL, "test"); 892 if (!dbh) { 893 exit(EXIT_FAILURE); 894 } 895 896 object = p6SumSkyfileRowAlloc(-32, "a string", 64.64, 64.64);897 if (!object) { 898 exit(EXIT_FAILURE); 899 } 900 901 if (! p6SumSkyfileInsertObject(dbh, object)) {691 warpRunRow *object; 692 693 dbh = psDBInit("localhost", "test", NULL, "test"); 694 if (!dbh) { 695 exit(EXIT_FAILURE); 696 } 697 698 object = warpRunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"); 699 if (!object) { 700 exit(EXIT_FAILURE); 701 } 702 703 if (!warpRunInsertObject(dbh, object)) { 704 exit(EXIT_FAILURE); 705 } 706 707 psFree(object); 708 psDBCleanup(dbh); 709 } 710 711 { 712 psDB *dbh; 713 warpInputExpRow *object; 714 715 dbh = psDBInit("localhost", "test", NULL, "test"); 716 if (!dbh) { 717 exit(EXIT_FAILURE); 718 } 719 720 object = warpInputExpRowAlloc(-32, "a string", -32, true); 721 if (!object) { 722 exit(EXIT_FAILURE); 723 } 724 725 if (!warpInputExpInsertObject(dbh, object)) { 726 exit(EXIT_FAILURE); 727 } 728 729 psFree(object); 730 psDBCleanup(dbh); 731 } 732 733 { 734 psDB *dbh; 735 warpSkyCellMapRow *object; 736 737 dbh = psDBInit("localhost", "test", NULL, "test"); 738 if (!dbh) { 739 exit(EXIT_FAILURE); 740 } 741 742 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string"); 743 if (!object) { 744 exit(EXIT_FAILURE); 745 } 746 747 if (!warpSkyCellMapInsertObject(dbh, object)) { 748 exit(EXIT_FAILURE); 749 } 750 751 psFree(object); 752 psDBCleanup(dbh); 753 } 754 755 { 756 psDB *dbh; 757 warpSkyfileRow *object; 758 759 dbh = psDBInit("localhost", "test", NULL, "test"); 760 if (!dbh) { 761 exit(EXIT_FAILURE); 762 } 763 764 object = warpSkyfileRowAlloc(-32, "a string", "a string", "a string", 64.64, 64.64); 765 if (!object) { 766 exit(EXIT_FAILURE); 767 } 768 769 if (!warpSkyfileInsertObject(dbh, object)) { 770 exit(EXIT_FAILURE); 771 } 772 773 psFree(object); 774 psDBCleanup(dbh); 775 } 776 777 { 778 psDB *dbh; 779 diffRunRow *object; 780 781 dbh = psDBInit("localhost", "test", NULL, "test"); 782 if (!dbh) { 783 exit(EXIT_FAILURE); 784 } 785 786 object = diffRunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"); 787 if (!object) { 788 exit(EXIT_FAILURE); 789 } 790 791 if (!diffRunInsertObject(dbh, object)) { 792 exit(EXIT_FAILURE); 793 } 794 795 psFree(object); 796 psDBCleanup(dbh); 797 } 798 799 { 800 psDB *dbh; 801 diffInputSkyfileRow *object; 802 803 dbh = psDBInit("localhost", "test", NULL, "test"); 804 if (!dbh) { 805 exit(EXIT_FAILURE); 806 } 807 808 object = diffInputSkyfileRowAlloc(-32, -32, "a string", "a string", "a string", true); 809 if (!object) { 810 exit(EXIT_FAILURE); 811 } 812 813 if (!diffInputSkyfileInsertObject(dbh, object)) { 814 exit(EXIT_FAILURE); 815 } 816 817 psFree(object); 818 psDBCleanup(dbh); 819 } 820 821 { 822 psDB *dbh; 823 diffSkyfileRow *object; 824 825 dbh = psDBInit("localhost", "test", NULL, "test"); 826 if (!dbh) { 827 exit(EXIT_FAILURE); 828 } 829 830 object = diffSkyfileRowAlloc(-32, "a string", 64.64, 64.64); 831 if (!object) { 832 exit(EXIT_FAILURE); 833 } 834 835 if (!diffSkyfileInsertObject(dbh, object)) { 836 exit(EXIT_FAILURE); 837 } 838 839 psFree(object); 840 psDBCleanup(dbh); 841 } 842 843 { 844 psDB *dbh; 845 stackRunRow *object; 846 847 dbh = psDBInit("localhost", "test", NULL, "test"); 848 if (!dbh) { 849 exit(EXIT_FAILURE); 850 } 851 852 object = stackRunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"); 853 if (!object) { 854 exit(EXIT_FAILURE); 855 } 856 857 if (!stackRunInsertObject(dbh, object)) { 858 exit(EXIT_FAILURE); 859 } 860 861 psFree(object); 862 psDBCleanup(dbh); 863 } 864 865 { 866 psDB *dbh; 867 stackInputSkyfileRow *object; 868 869 dbh = psDBInit("localhost", "test", NULL, "test"); 870 if (!dbh) { 871 exit(EXIT_FAILURE); 872 } 873 874 object = stackInputSkyfileRowAlloc(-32, -32); 875 if (!object) { 876 exit(EXIT_FAILURE); 877 } 878 879 if (!stackInputSkyfileInsertObject(dbh, object)) { 880 exit(EXIT_FAILURE); 881 } 882 883 psFree(object); 884 psDBCleanup(dbh); 885 } 886 887 { 888 psDB *dbh; 889 stackSumSkyfileRow *object; 890 891 dbh = psDBInit("localhost", "test", NULL, "test"); 892 if (!dbh) { 893 exit(EXIT_FAILURE); 894 } 895 896 object = stackSumSkyfileRowAlloc(-32, "a string", 64.64, 64.64); 897 if (!object) { 898 exit(EXIT_FAILURE); 899 } 900 901 if (!stackSumSkyfileInsertObject(dbh, object)) { 902 902 exit(EXIT_FAILURE); 903 903 }
Note:
See TracChangeset
for help on using the changeset viewer.
