Coder Social home page Coder Social logo

cs307-server's People

Contributors

bradwarrum avatar rogerse avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

alexjeni rogerse

cs307-server's Issues

Link vs Create UPC

Does creating a UPC link?

also what is the format of units int (enumeration) or string:
same goes for package name

{
"description" : "Planter's Cocktail Peanuts",
"packageName" : 23,
"packageUnits" : 3,
"packageSize" : 12.0
}

{
"description" : "Orange",
"packageName" : "each",
"packageUnits" : "unit",
"packageSize" : 1.0
}

Setting list quantity to 0 does not remove item.

sent:
{
"items": [
{
"UPC": "011110799906",
"fractional": 1,
"quantity": 0
}
],
"version": 1428634713911
}

got back:

listJSON:
{
"items": [
{
"UPC": "011110799906",
"description": "ibu",
"packaging": {
"packageName": "bottle",
"unitAbbreviation": "units",
"unitName": "units",
"packageSize": 500.0,
"unitID": 14
},
"fractional": 1,
"quantity": 0
},
{
"UPC": "00001",
"description": "banana",
"packaging": {
"packageName": "bunch",
"unitAbbreviation": "units",
"unitName": "units",
"packageSize": 1.0,
"unitID": 14
},
"fractional": 1,
"quantity": 0
},
{
"UPC": "00002",
"description": "oranges",
"packaging": {
"packageName": "orange",
"unitAbbreviation": "units",
"unitName": "units",
"packageSize": 1.0,
"unitID": 14
},
"fractional": 3,
"quantity": 0
},
{
"UPC": "00006",
"description": "pears",
"packaging": {
"packageName": "pear",
"unitAbbreviation": "units",
"unitName": "units",
"packageSize": 1.0,
"unitID": 14
},
"fractional": 0,
"quantity": 5
}
],
"name": "list1",
"version": 1428634838270
}

UserRegistrationWrapper increments UserId on insertion fail

#1 changed the UserRegistrationWrapper to use 1 query instead of 2 and simply use the SQLState to detect presence of a user with a specific email. On insertion the auto-increment field increments even if there is an exception, so userIDs are not contiguous.

Is this easily fixable by modifying the SQL query within the registration wrapper?

/cc @rogerse

Register user returning code 405

Registering a user is returning an error code that does not exist in documentation of 405.
it does not return an object

I did a dumb

Warning: missed something in sprint planning

The server and client need to do:
As a user I would like to be able to create an item entry for a product that
does not have an associated UPC code. (Backlog #5)

Only created work time for the android app. Server will need API adaption to cooperate.

linking no UPC issue

04-29 13:24:21.546 16148-16148/com.example.android.virtualpantry E/View﹕ hasTransientState decremented below 0: unmatched pair of setHasTransientState calls
04-29 13:24:27.405 16148-16191/com.example.android.virtualpantry E/SQLiteLog﹕ (1299) abort at 13 in [INSERT INTO InventoryItems(Fractional,PackageUnits,Description,PackageQuantity,PackageName,UPC,Quantity,HouseholdID) VALUES (?,?,?,?,?,?,?,?)]: NOT NULL constraint failed: InventoryItems.UPC
04-29 13:24:27.411 16148-16191/com.example.android.virtualpantry E/SQLiteDatabase﹕ Error inserting Fractional=0 PackageUnits=14 Description=Banana PackageQuantity=1.0 PackageName=banana UPC=null Quantity=0 HouseholdID=3
android.database.sqlite.SQLiteConstraintException: NOT NULL constraint failed: InventoryItems.UPC (code 1299)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:790)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:926)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1581)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1451)
at com.example.android.virtualpantry.Database.InventoryDataSource$1.linkStage(InventoryDataSource.java:161)
at com.example.android.virtualpantry.Database.InventoryDataSource$1.requeryStage(InventoryDataSource.java:143)
at com.example.android.virtualpantry.Database.InventoryDataSource$1.pullInventoryStage(InventoryDataSource.java:117)
at com.example.android.virtualpantry.Database.InventoryDataSource$1.doInBackground(InventoryDataSource.java:91)
at com.example.android.virtualpantry.Database.PersistenceTask.doInBackground(PersistenceTask.java:35)
at com.example.android.virtualpantry.Database.PersistenceTask.doInBackground(PersistenceTask.java:18)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Link vs Create UPC

Does creating a UPC link?

also what is the format of units int (enumeration) or string:
{
"description" : "Planter's Cocktail Peanuts",
"packageName" : 23,
"packageUnits" : 3,
"packageSize" : 12.0
}

{
"description" : "Orange",
"packageName" : "each",
"packageUnits" : "unit",
"packageSize" : 1.0
}

Link failing

03-06 12:58:31.537 22023-22328/com.example.android.virtualpantry V/linkItem﹕ regstr={
"description": "coke zero",
"unitName": "bottle"
}
03-06 12:58:31.607 22023-22328/com.example.android.virtualpantry E/linkItem﹕ Unkwnon
java.io.FileNotFoundException: http://IP_REDACTED/households/3/items/049000045840/link?token=5uhdVgttv6nMmxNjwAew1jOGtGphi3yh

Attempting to link an item resulting in 400 malformed input

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.